Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default M S V B A Next X Excel 2003

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default M S V B A Next X Excel 2003

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default M S V B A Next X Excel 2003

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? lewisma9 Excel Discussion (Misc queries) 0 February 27th 07 12:23 AM
Copying Excel 2003 Selection into Outlook 2003 HTML E-Mail Message [email protected] Excel Discussion (Misc queries) 0 July 10th 06 03:07 PM
Upgrade from Excel 2000 to Excel 2003 without MS Office 2003? brigida3 Excel Discussion (Misc queries) 1 January 22nd 06 05:13 PM
Exporting addresses from excel 2003 to outlook 2003 Linda H Excel Discussion (Misc queries) 0 November 14th 05 06:58 PM
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. Cindy Winegarden Excel Discussion (Misc queries) 0 November 28th 04 12:07 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"