Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Kevin has responded to your original question... I just wanted to make a
brief comment about your code. You do not need the If-Then test inside your loop. The Do Until SCell.Value = 1 statement won't let the loop execute if SCell.Value equals 1, so there is no need to see if it equals 1 inside the loop itself. If you think it might be clearer to you, you can change the Do loop statement to this instead... Do While SCell.Value < 1 which looks like the If-Then test you were performing originally (you still would not need the If-Then test within your loop). Rick "Jo" wrote in message oups.com... Hi, I am getting this error: "Object variable or With block variable is not set!" Here is the mcro's code: Sub Solve() Dim SCell As Range Do Until SCell.Value = 1 If SCell.Value < 1 Then Range("J24").Select Calculate End If Loop End Sub Thanks, Jo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is wrong with the code? | Excel Discussion (Misc queries) | |||
Add chart - what is wrong with the code? | Charts and Charting in Excel | |||
Can someone tell me what is wrong with this code? | Excel Discussion (Misc queries) | |||
Need to "not show" piece of line in graph | Charts and Charting in Excel | |||
What's wrong with my code ? | Excel Worksheet Functions |