Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Range(Cells(30, 2), Cells(30, 2)).Select
Speed = Selection * 100000 For X = 1 To Speed: Next X Macro stops at Next X While on Auto Selection, Even with a manual selection It will always stop at next X. Speed Selection is 400, Which Is about 1 loop / Sec I'd Appreciate any Input, THANKS How do I update The Date (18 - 3 - 07) In the Display name Below |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
No sure what your problem is but this works:
Sub a() Range(Cells(30, 2), Cells(30, 2)).Select Speed = Selection * 100000 For x = 1 To Speed: Next x MsgBox x ' <===== 40000001 End Sub "Quandary 11 - 3 - 07" wrote: Range(Cells(30, 2), Cells(30, 2)).Select Speed = Selection * 100000 For X = 1 To Speed: Next X Macro stops at Next X While on Auto Selection, Even with a manual selection It will always stop at next X. Speed Selection is 400, Which Is about 1 loop / Sec I'd Appreciate any Input, THANKS How do I update The Date (18 - 3 - 07) In the Display name Below |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ok, so in cell B30 you have a value of 400
so Speed = Selection * 10000 gives Speed a value of 40000000 So your For...Next loop simply increments X 40000000 times and falls out. I'm not sure what Auto Selection or manual selection has to do with anything (actually, not sure what you're speaking of, to be truthful). Next X is the last statement in your code and if you're following it in code step-by-step, then that's where things end before exiting the routine? As Toppers shows, if you add more code after that For...Next line, it gets executed - or it should. If you want to know how long that loop is actually taking, to the nearest second, then try this Sub timeIt() Dim Speed as Long Dim startTimerValue as Long Dim X as Long Speed= Range("B30") * 10000 startTimerValue = Timer For X = 1 To Speed: Next X Msgbox "Elapsed seconds: " & Timer - startTimerValue End Sub As for the date in your displayed name - click on the icon to the right of the [Sign Out] button at the upper right of the web page (says "Edit my Profile" if you hover over it) and change the entry in the Display Name portion of your profile? "Quandary 11 - 3 - 07" wrote: Range(Cells(30, 2), Cells(30, 2)).Select Speed = Selection * 100000 For X = 1 To Speed: Next X Macro stops at Next X While on Auto Selection, Even with a manual selection It will always stop at next X. Speed Selection is 400, Which Is about 1 loop / Sec I'd Appreciate any Input, THANKS How do I update The Date (18 - 3 - 07) In the Display name Below |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? | Excel Discussion (Misc queries) | |||
Copying Excel 2003 Selection into Outlook 2003 HTML E-Mail Message | Excel Discussion (Misc queries) | |||
Upgrade from Excel 2000 to Excel 2003 without MS Office 2003? | Excel Discussion (Misc queries) | |||
Exporting addresses from excel 2003 to outlook 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. | Excel Discussion (Misc queries) |