#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default 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




Reply
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
Runtime Error '91' Object variable or With block variable not set Alec Coliver Excel Discussion (Misc queries) 2 October 24th 09 02:29 PM
Run-time Error'91: Object variable or With block variable not set DynamiteSkippy Excel Programming 4 September 26th 05 07:47 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Run-time error '91': "Object variable or With block variable not set Mike[_92_] Excel Programming 2 December 30th 04 10:59 AM
Cells.Find error Object variable or With block variable not set Peter[_21_] Excel Programming 2 May 8th 04 02:15 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"