Excel generated error report if bitmaps embedded in VBA

L

Larry

I'm creating an application in excel using VBA. I wanted to be able to embed pictures into the forms without having to ship separate files. I saw on the internet that someone had suggested opening some other application, opening the picture in the application, doing a copy, and then in excel, doing a paste into the "Picture" property field in the properties window for the Image box.

This idea worked great. But for some reason (and it is intermittant) if i save and then open the file and run the VBA code, excel will crash and open the "I've generated an error report. Do you want me to send to Microsoft" window. The wierd thing is that if I single step through all the code, it works fine. And sometimes when I open excel and run the script, it works fine. But at other times, it generates the error message and even rebooting the machine doesn't help. Note that I had created 3 revisions of the program before I saw the error occur. Once it starded, all 3 of the older versions also generated the error, which they hadn't done originally.

Once I remove all the graphics from the code, everything works just great

Anyone else seen this? I'm running Office XP on Windows XP
thank
larr

PS: Anyone know a different way to embed graphics within a spreadsheet/VBA so that it is distrubuted as a single file and can be installed in any directory by the user? --thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top