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
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
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.
 

Tarheel

Board Regular
Joined
Jul 30, 2002
Messages
158
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
 

DRJ

MrExcel MVP
Joined
Feb 17, 2002
Messages
3,853
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.
 

Tarheel

Board Regular
Joined
Jul 30, 2002
Messages
158

ADVERTISEMENT

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
 

Tarheel

Board Regular
Joined
Jul 30, 2002
Messages
158
Ivan, as usual, thank you so much. It works beautifully now. I really appreciate your help.

-- Richard
 

Watch MrExcel Video

Forum statistics

Threads
1,127,327
Messages
5,624,029
Members
416,006
Latest member
PCaffrey

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
Top