Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I have a problem. In excel macro I have to use a "do
while loop". I have two conditions to pass the loop. I made a code as below, d1=2 d2=5 r1=0, Do While and(r1 =0, d1 < d2) ..... ..... ..... loop but it gives an syntax error message at the "do while" line. I guess I am using "and function" improperly. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There is a difference between how to do AND conditions in VBA from the way
you would do them in a worksheet function; the VBA syntax is: Do While (r1 =0) And (d1 < d2) -- - K Dales "oercim" wrote: Hello, I have a problem. In excel macro I have to use a "do while loop". I have two conditions to pass the loop. I made a code as below, d1=2 d2=5 r1=0, Do While and(r1 =0, d1 < d2) ..... ..... ..... loop but it gives an syntax error message at the "do while" line. I guess I am using "and function" improperly. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It worked, thanks alot.cheers.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text "comparison" operator for "contains" used in an "IF" Function | Excel Worksheet Functions | |||
Excel 2003: Conditional Formatting using "MIN" & "MAX" function | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
inserting a conditional "go to" command on a excel "if" function | Excel Worksheet Functions | |||
Please add a "sheet" function like "row" and "column" functions | Excel Programming |