PC Review


Reply
Thread Tools Rate Thread

What is the #define equivalent?

 
 
Sing
Guest
Posts: n/a
 
      25th Sep 2007
Dear Excel Gurus,

In C, one can make convenient definitions like;
#define ABC 242
#define NAME "James Smith"

In Excel VBA, is there an equivalent for #define?

Thanks.


 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      25th Sep 2007
Const

say

Const ABC as long = 242

Const NAME as string = "James Smith"

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sing" <(E-Mail Removed)> wrote in message
news:fdb60s$t4e$(E-Mail Removed)...
> Dear Excel Gurus,
>
> In C, one can make convenient definitions like;
> #define ABC 242
> #define NAME "James Smith"
>
> In Excel VBA, is there an equivalent for #define?
>
> Thanks.
>
>



 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      25th Sep 2007
VBA does not have a preporcessor the same as C does. What you have posted are
just constants which are handled, but if you wanted to get into defining
formulas and such then you are out of luck.
--
HTH...

Jim Thomlinson


"Sing" wrote:

> Dear Excel Gurus,
>
> In C, one can make convenient definitions like;
> #define ABC 242
> #define NAME "James Smith"
>
> In Excel VBA, is there an equivalent for #define?
>
> Thanks.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Equivalent of GetPrivateProfileString equivalent in C#? Germic Microsoft C# .NET 1 24th Jan 2005 09:22 AM
define ID =?Utf-8?B?U3VzYW4gSG9la3N0cmE=?= Microsoft Access Database Table Design 3 8th Dec 2004 01:52 PM
Define Value Fernando Peixito Microsoft Access Macros 1 3rd Feb 2004 11:50 AM
VB.NET equivalent to #define in C++ k3 Microsoft VB .NET 4 22nd Jan 2004 05:24 AM
C# equivalent to C's #define Scott Microsoft C# .NET 1 30th Jul 2003 07:59 PM


Features
 

Advertising
 

Newsgroups
 


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