LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default loop using double

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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Double Double Quotes [email protected] Excel Programming 5 June 20th 07 02:14 PM
Help with double loop Marcu2 Excel Programming 2 February 13th 07 05:03 PM
double axis, double problem (i hope only to me) kitcho Charts and Charting in Excel 1 December 30th 06 12:52 AM
Help with "double" loop! erikhs[_15_] Excel Programming 4 July 26th 06 05:39 PM
double loop madness - help with macro Nicole Seibert Excel Programming 1 April 6th 06 07:26 AM


All times are GMT +1. The time now is 06:06 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"