Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default What does this do?

RNUM is a loop variable in the
For - Next struct.

If MRow e.g. is 5, then

RNUM will take the values 1 through 5
as the For-Next-loop loops.

Counter=1
For RNUM=1 to MRow
Counter=Counter+RNUM
Next RNUM

After looping, Counter wil have the value 16

--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.

"RH" skrev i en meddelelse
...
I'm working on an Excel project and ran across this code
snippet:

###########################
temp = InputBox(prompt:="Enter the Number of the last row
shown on the screen (i.e. 1130):", _
Title:="Length of File",
Default:="2000")
If temp = "" Then
MsgBox prompt:="Convert Data Procedure
Canceled."
Range("a1").Select
Exit Sub
Else
End If
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
MRow = CSng(temp +
10) 'Converts temp from string to
number
counter1 = 0
For Rnum = 1 To MRow

##############################

So, in this case....What is RNUM? I don't understand
the "= 1 TO MROW" here.

Can someone elaborate please?

Thanks!
Bob



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



All times are GMT +1. The time now is 08:02 AM.

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

About Us

"It's about Microsoft Excel"