ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  vba on Office 2010 64 bit windows 8
Posted by Thiago Almeida Franco on Sep-17-2013 20:05
Hi,

i changed my computer recently and my sheets are not working anymore when i try to draw
a finance chart.
I use windows 8 , office 2010 64 bit. The part of the code that shows the problem is

Set simplebar = c.makePicture()

The message is "automation error".


Is there any problem with the vba/excel package running on windows 8 or office 2010 64
bit?


Thanks.

  Re: vba on Office 2010 64 bit windows 8
Posted by Peter Kwan on Sep-18-2013 00:40
Hi Thiago,

I will need to set up a similar environment (Office 2010 64-bit on Windows 8) for more detail testing. In the mean time, instead of using makePicture, could you try the following code to see if it results in any error?

'Please change "c:\\xxx" to a directory that exists on your computer and can be read and written by the user

Call c.makeChart("c:\\xxx\\aaa.png")

Set simplebar = LoadPicture("c:\\xxx\\aaa.png")

If the above also produces error, please let me know which of the above two lines produce the error, and what type of error is produced.

Regards
Peter Kwan

  Re: vba on Office 2010 64 bit windows 8
Posted by Thiago Almeida Franco on Sep-18-2013 01:37
When i use this code you told me, vba makes the correct chart in a a picture(i saw it with
an image program) but do not load it. The first line is ok but the second line shows the error
message 481: "invalid picture".

I am not sure if this is the problem but a big difference that i saw in 32 to 64 bit is that 64
bit only accept functions with the argument Ptrsafe before it. Then i have to change all
"Private Declare Function" to "Private Declare Ptrsafe Function".

Thanks.
Regards.

  Re: vba on Office 2010 64 bit windows 8
Posted by Thiago Almeida Franco on Sep-18-2013 01:45
Oh, it works fine if i change the png file for a bmp file.


Thank you so much, it solved my problem.