PictureBox control

Hap

Well-known Member
Joined
Jul 20, 2005
Messages
647
How would one go about using a PictureBox control on an EXCEL userform? Maybe the appropriate question would be is this even possible?

Thank you
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
The image control does not support the same functionality of the picturebox control though. I was hoping that I could call the picturebox control with an api function or some such operation.
 
Upvote 0
what do you need to do with the picture? there may be a work around. from memory vba never had the function exactly like a picture box, but work arounds are able to be done
 
Upvote 0
I am trying to learn how to create some graphics dynamically so I'm modifying the approach in the following:

http://www.garybeene.com/3d/3d-vb.htm

However, since it is all written in VB I'm having to interpret what is happening. He uses the picturebox control to create the triangles that compose the image. I don't know how I would replicate that process with an image control in VBA. Clearly this is a level of GUI control that isn't built into EXCEL but due to my inability to add software to the company computer I am trying to accomplish this anyway (not to mention trying to learn something along the way).

Thanks for any help
 
Upvote 0
I had a skim through the code, you could use the triangle shape (i would use the sheet as a form not a form itself). The shapes have the function to rotate and by using the triangle you would be able to build it (math and calculations aside of course)

If you were desperate to do this in vba thats how I would go about it, otherwise a good way around installing programs on works computers is: (I provide this info as a referance and take no responcibility for how its used)

buy or use a USB flash drive, at your home computer install program of choice onto the flash drive (not the C: drive you can change it). once all done go to work, insert flash drive and just run the app :)
 
Upvote 0
I already have a fairly involved multipage form. I want to be able to create the 3D images dynamically based on the user input in the form. If I were to use OpenGL or Direct3D would I have to declare every function in the libraries that I wanted to use? That is painful but doable. The only thing I would have to work through would be embeding the graphics window in the VBA userform. From there it should be straightforward use of the library functions to perform the same graphics operations.

Maybe I'm way off base. I know I'm in deeper water than I'm used to. :)
 
Upvote 0
hmm i have never seen openGL or direct 3d used in vba, but if you have the object libaray then simply adding a referance to that libary under tools should work fine. no declarations
 
Upvote 0
I haven't seen it done either. Time to give it a shot.

Forgot it could be that simple (to reference the library)

Thanks for the help.
 
Upvote 0
yeah i often forget the referance libary (im the worst speller :))

no worries hope I have helped in some way. let us know when/if you get it going
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,031
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top