ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   for next loop not working (https://www.excelbanter.com/excel-programming/311599-re-next-loop-not-working.html)

Tom Ogilvy

for next loop not working
 
Where is the image control? On a userform or a worksheet

How slow do you want the transition?

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
"Ron Rosenfeld" wrote in message
...
On Fri, 24 Sep 2004 17:24:41 +0100, "Tim"
wrote:

could someone explain why the following simple bit of code does not

work?

Private Sub Image1_Click()
For x = 10 To 1
Image1.Width = x
Next x
End Sub



Try (2nd line)

For x = 10 to 1 Step -1


thanks Ron, it works, but i thought if i did it as a loop, it would have a
smooth transition, it just seems to go from all to nothing in one go

(maybe
i need a line to update the form?)

tim






All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com