PDA

Click to See Complete Forum and Search --> : Graphics programming in VBA (howto / can you?)


dale_albiston
Jun 13th, 2006, 04:36 AM
simple question, hopefully a simple answer.

is it possible to do a custom 'drawing' in vba? e.g. to a '.wmf' file?

the reason is i need to create a custom chart to do some analysis and the standard types (including pivots) in excel & access don't work.

what i need to do is draw lines, write simple text & draw rectangles etc, nothing fancy. then to show the .wmf in a picture box (that bit i can do).

I'm looking for the wmf route to allow me to print the chart / export it without too much effort. working with a bmp would be ok as well though.

question is: is this possible in VBA? I know its possible in vb.net but at the mo I've been informed i'm stuck with VBA...

RobDog888
Jun 13th, 2006, 07:04 AM
Unfortunately there is very very limited support, if any, in VBA. You have to result to vb GDI APIs. Not an easy task. Perhaps your allot better off if you use a third party control.

dale_albiston
Jun 13th, 2006, 08:03 AM
thats kind of what i figured. oh well.

thanks anyway. i can see sorting out this in vb.net (as a rough & ready draft application) in a few hours this weekend. just means i'll be the only one here running it.

RobDog888
Jun 13th, 2006, 08:12 AM
What version of .net are you running? Do you have VSTO?