Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

What is the #define equivalent?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sing - 25 Sep 2007 16:29 GMT
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.
Bob Phillips - 25 Sep 2007 16:33 GMT
Const

say

Const ABC as long = 242

Const NAME as string = "James Smith"

Signature

HTH

Bob

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

> Dear Excel Gurus,
>
[quoted text clipped - 5 lines]
>
> Thanks.
Jim Thomlinson - 25 Sep 2007 17:16 GMT
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.
Signature

HTH...

Jim Thomlinson

> Dear Excel Gurus,
>
[quoted text clipped - 5 lines]
>
> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.