take a look at this?

Tarheel

Board Regular
Joined
Jul 30, 2002
Messages
158
Hi all,

Will someone take a look at my sample and tell me what's going on. I created a userform, and on that userform are 4 images of identical width and height, and a label that covers them up. I am using a For/Next loop to scroll each image off the left side of the userform and then back on again.

It does what I expected it to do. However, when the images first start moving, there are "artifacts" or little flashes that happen that affect the smoothness of the scroll. They only seem to happen at certain points in the scroll.

Right-click the link below and choose "Save Target As.." to save it to your machine.

Thanks for the help!
-- Richard

http://www.chatham1992.com/image_scroll_test.xls
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I haven't downloaded the file, but did you use Application.Screenupdating=False at the beginning of your code, and then Applicaiton.Screenupdating=True at the end?

Edit: From the VBA help file:
Remarks
Turn screen updating off to speed up your macro code. You won't be able to see what the macro is doing, but it will run faster.
 
Upvote 0
Hi Kristy,

Thanks for the quick reply. Although not included in the sample file I referenced, I did have Application.ScreenUpdating = False and = True in my original code. The images scrolling on the userform exhibited the same symptoms regardless of whether ScreenUpdating was turned on or off.

Thanks!
-- Richard
 
Upvote 0
I downloaded it and tried a few things. I put screen updating = true, then false, doevents, nothing seemed to work. You might be better of to turn the images into an animated gif and then use the webbrowser control.
 
Upvote 0
Thanks for looking, Jacob. I tried various ways of doing the scroll and updating the userform as well, with the same results that you received. Everything performed the same way.

This isn't that big of a deal, the userform is just going to be a progress bar. With some help, I just thought we'd discover why the scroll causes the flashing.

Thanks again,
Richard
 
Upvote 0
Ivan, as usual, thank you so much. It works beautifully now. I really appreciate your help.

-- Richard
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,428
Members
448,896
Latest member
MadMarty

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