ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using "Case .. To" (https://www.excelbanter.com/excel-programming/336041-using-case.html)

Mike

Using "Case .. To"
 
Hi everyone,

Say I have a VB piece of code like this:

Case 3.45 To 4.44: Num = 40

Can't I replace the "3.45" with a cell location so I can be able to
vary the value when needed?

I tried this: Case "h35" To "i35": Num = 40

No complaint by the VB compiler, but the code wasn't performing well!

Thanks,
Mike


Tom Ogilvy

Using "Case .. To"
 
Case Range("h35").Value To Range("i35").Value : Num = 40

--
Regards,
Tom Ogilvy

"Mike" wrote in message
ups.com...
Hi everyone,

Say I have a VB piece of code like this:

Case 3.45 To 4.44: Num = 40

Can't I replace the "3.45" with a cell location so I can be able to
vary the value when needed?

I tried this: Case "h35" To "i35": Num = 40

No complaint by the VB compiler, but the code wasn't performing well!

Thanks,
Mike





All times are GMT +1. The time now is 06:25 AM.

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