Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just ran this code in Excel 2003 and it ran exactly as expected.
But typically I've only seen integers allowed in loops. Excel seems to be the exception to this rule. This code could be written as: Sub test() Dim i As integer Dim j As double j = 0.2 For i = -15 To 15 Debug.Assert i*j < 3 Debug.Print i*j Next But I am not familiar with the debug command. What do Debug.Assert and Debug.Print do? On Nov 8, 3:40*am, heev wrote: I have the following sub. Sub test() Dim i As Double Dim j As Double j = 0.2 For i = -3 To 3 Step j Debug.Assert i < 3 * * Debug.Print i Next End Sub If I run this code the last step 3 will not run. If I modify I to 2.5 it does. What's going on? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Double Double Quotes | Excel Programming | |||
Help with double loop | Excel Programming | |||
double axis, double problem (i hope only to me) | Charts and Charting in Excel | |||
Help with "double" loop! | Excel Programming | |||
double loop madness - help with macro | Excel Programming |