Updating an ActiveX Image Control While Running a Macro

macohen

New Member
Joined
Feb 25, 2014
Messages
3
Currently I use a macro to export a page as a pdf. This page is generated whenever I change the document number in a certain cell. At the bottom of this page are 3 activex image controls that load pictures depending on which document is selected. Everything works fine, and my pages export nicely, except that the 3 activex image control frames I have do not update their pictures while the macro is running. If I change the document number manually the frames update. If the macro does it, the frames don't until the macro finishes.

The VBA code that allows for the images to update is a part of the worksheet's code, while the PDF macro is a module. Could this be the problem?

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Just a guess ...

Try adding "DoEvents" to your code. That will force the operating system to do some housekeeping.

Gary
 
Upvote 0
I actually just figured this out around 30 minutes ago. Thank you for the response though.
 
Upvote 0

Forum statistics

Threads
1,216,106
Messages
6,128,863
Members
449,473
Latest member
soumyahalder4

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