ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Please help with do while (https://www.excelbanter.com/excel-programming/322760-please-help-do-while.html)

Alvin Hansen[_2_]

Please help with do while
 
Hi

Because i must have ciffers from 1 -9 with 01-02-03 .....
i use this
kur1 = Range("kursist!$g$1").Text
But when i use this in my do while like
Do While kur1 <= kur2
bla bla bla
kur1 = kur1 + 1
Loop
then it don't stop the loop

CAn some one help please - i know how to do it if i dont use 01-02-....
then i can use
kur1 = Range("kursist!$g$1").value

Best regards
alvin



sebastienm

Please help with do while
 
Hi Alvin,
I don't understand what you are trying to do.

What data type is kur1?
If kur1 is text, then say kur1 is 'Hello' then kur1+1 is 'Hello1'
What is kur1, what is kur2 (how is it defined, how is it declared)

Regards,
Sebastien

"Alvin Hansen" wrote:

Hi

Because i must have ciffers from 1 -9 with 01-02-03 .....
i use this
kur1 = Range("kursist!$g$1").Text
But when i use this in my do while like
Do While kur1 <= kur2
bla bla bla
kur1 = kur1 + 1
Loop
then it don't stop the loop

CAn some one help please - i know how to do it if i dont use 01-02-....
then i can use
kur1 = Range("kursist!$g$1").value

Best regards
alvin



Alvin Hansen[_2_]

Please help with do while
 
Hi
kur1 = Range("kursist!$g$1").Text
In Range("kursist!$g$1").Text I have 01 or 02 or 03 or 04 or 05
...............
so kur1 is 01 or 02 or 03 or 04 or 05 .............

Alvin



"sebastienm" skrev:

Hi Alvin,
I don't understand what you are trying to do.

What data type is kur1?
If kur1 is text, then say kur1 is 'Hello' then kur1+1 is 'Hello1'
What is kur1, what is kur2 (how is it defined, how is it declared)

Regards,
Sebastien

"Alvin Hansen" wrote:

Hi

Because i must have ciffers from 1 -9 with 01-02-03 .....
i use this
kur1 = Range("kursist!$g$1").Text
But when i use this in my do while like
Do While kur1 <= kur2
bla bla bla
kur1 = kur1 + 1
Loop
then it don't stop the loop

CAn some one help please - i know how to do it if i dont use 01-02-....
then i can use
kur1 = Range("kursist!$g$1").value

Best regards
alvin



Alvin Hansen[_2_]

Please help with do while
 
Hi

HAve done it

Alvin


"Alvin Hansen" skrev:

Hi

Because i must have ciffers from 1 -9 with 01-02-03 .....
i use this
kur1 = Range("kursist!$g$1").Text
But when i use this in my do while like
Do While kur1 <= kur2
bla bla bla
kur1 = kur1 + 1
Loop
then it don't stop the loop

CAn some one help please - i know how to do it if i dont use 01-02-....
then i can use
kur1 = Range("kursist!$g$1").value

Best regards
alvin




All times are GMT +1. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com