ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Variable (https://www.excelbanter.com/excel-programming/362092-variable.html)

alvin Kuiper

Variable
 
Hi
Why can't i use this:
Dim num, num2, num3 as single ?

Shall i use this:

Dim num as single, num2 as single, num3 as single??????????

regards
alvin


Norman Jones

Variable
 
Hi Alvin,

The declaration

Dim num, num2, num3 as single ?


is equvalent to:

Dim num As Variant
Dim num2 As Variant
Dim num3 As Single


---
Regards,
Norman



"alvin Kuiper" wrote in message
...
Hi
Why can't i use this:
Dim num, num2, num3 as single ?

Shall i use this:

Dim num as single, num2 as single, num3 as single??????????

regards
alvin




Bob Phillips[_6_]

Variable
 
You can use it if you wish, but it is just declares num1 and num2 as variant
types, not single.

If you need them all as single, then do it as per your second example.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
Why can't i use this:
Dim num, num2, num3 as single ?

Shall i use this:

Dim num as single, num2 as single, num3 as single??????????

regards
alvin




alvin Kuiper

Variable
 
Thanks

Alvin


"Bob Phillips" wrote:

You can use it if you wish, but it is just declares num1 and num2 as variant
types, not single.

If you need them all as single, then do it as per your second example.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
Why can't i use this:
Dim num, num2, num3 as single ?

Shall i use this:

Dim num as single, num2 as single, num3 as single??????????

regards
alvin






All times are GMT +1. The time now is 02:01 PM.

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