The Loop starts but wont stop. I don't see anything wrong with the code.
Thanks![]()
Please Login or Register to view this content.
The Loop starts but wont stop. I don't see anything wrong with the code.
Thanks![]()
Please Login or Register to view this content.
Last edited by VBA Noob; 05-24-2007 at 12:51 PM.
Hey Dummy99...
i couldnt really work it out either so i rewrote it...
does this do what you want??
![]()
Please Login or Register to view this content.
Thanks Stuie,
Your stuff works but I still don't understand why mine didn't work. I have other similar Do Until / Loop routines in the same program an they work.
Thanks again!
InputBox returns a string and not a number. And IsNumeric can only check if a variable can be expressed as a number and not if it is a number. eg if ABC = "12"Originally Posted by Dummy99
then IsNumeric(ABC) is True even though ABC is a string and not a number. You will have to first convert the string variable to a number variable and then use it. Something like this
Surprisingly For ... next loop will work even if you do not convert it to number.![]()
Please Login or Register to view this content.
eg if you say for n= 1 to Base it will work. Apparently For...Next internally converts Base to a number and then use it.
A V Veerkar
Last edited by avveerkar; 05-24-2007 at 01:02 PM.
Avveekar,
EXCELLENT!
I knew there was an explanation & I should have thought of the 'numeric' problem myself. It aslo didn't work with an "IF" statement (same reason).
Many thanks,
Dummy99
I am glad that I could be of a little help.Originally Posted by Dummy99
And can we call you by some other name? To address you as Hi dummy sounds odd. Just kidding!!
A V Veerkar
Last edited by avveerkar; 05-25-2007 at 01:27 AM.
Just happen to be reviewing my posts and saw that my problem was using 'Do While' (which is incorrect).
I should have used 'Do Until'
There is no 'Do While'. It is simply 'While' and it doesn't use 'Loop' but 'Wend'
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks