|
-
Feb 2nd, 2006, 11:05 PM
#1
Thread Starter
Member
VBA in excel: EASY question for you
Here's my question, just scroll to the 'While Loop', and look at:
distance = Sheets("QMP-Auto").Range("C[range0]").Value
The C column has values from 0-1500, which i call 'distance'. I want to keep adding .01 to 't60auto' until 'distance' gets above 60, that way i can use the inital value of t60auto when distance > 60.
I think everything is fine until i get to Range, then it screws up... HELP!
Thanks!
-----------
Sub sixtyauto()
Dim dt
Dim rangeadd
Dim t60
Dim distance
Dim range0
dt = 0.01
rangeadd = 1
t60auto = 0
distance = 0
range0 = 3
While distance < 60
t60auto = t60auto + dt
distance = Sheets("QMP-Auto").Range("C[range0]").Value
range0 = range0 + 1
Wend
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|