PC Review


Reply
Thread Tools Rate Thread

Declaring an setting a "public" variable

 
 
PSH
Guest
Posts: n/a
 
      9th Jul 2003
Hello !

I know there is a way to declare a varialble that can be
declared in the heading of the module so that the
variable can be set and used as "constant" as long as the
module is open does anyone know how.

PSH
 
Reply With Quote
 
 
 
 
Scott McDaniel
Guest
Posts: n/a
 
      9th Jul 2003
If you need a variable:

PUBLIC NameOfYourVariable AS TypeOfYourVariable

If you want a constant:

PUBLIC CONST NameOfYOurConstant AS TypeOfYourConstant = ValueOfYourConstant

"PSH" <(E-Mail Removed)> wrote in message
news:03ff01c34602$39e51820$(E-Mail Removed)...
> Hello !
>
> I know there is a way to declare a varialble that can be
> declared in the heading of the module so that the
> variable can be set and used as "constant" as long as the
> module is open does anyone know how.
>
> PSH



 
Reply With Quote
 
Chris
Guest
Posts: n/a
 
      10th Jul 2003
Put those right below Option Explicit.

--
Chris

Please respond to newsgroups, as I
don't check this address very often.
"Scott McDaniel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If you need a variable:
>
> PUBLIC NameOfYourVariable AS TypeOfYourVariable
>
> If you want a constant:
>
> PUBLIC CONST NameOfYOurConstant AS TypeOfYourConstant =

ValueOfYourConstant
>
> "PSH" <(E-Mail Removed)> wrote in message
> news:03ff01c34602$39e51820$(E-Mail Removed)...
> > Hello !
> >
> > I know there is a way to declare a varialble that can be
> > declared in the heading of the module so that the
> > variable can be set and used as "constant" as long as the
> > module is open does anyone know how.
> >
> > PSH

>
>



 
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
Problem declaring "Public Property" and "Friend Shared" jbeteta@gmail.com Microsoft ASP .NET 3 8th Aug 2006 02:39 PM
Declaring a, "Module Constant", Public or Private? =?Utf-8?B?Sm9obiBQaGVsYW4=?= Microsoft Access Form Coding 2 5th Mar 2006 06:36 PM
Urgently need VB Help - Declaring "Global" Variable? =?Utf-8?B?QXByaWw=?= Microsoft Excel Programming 0 17th Feb 2005 07:01 PM
Re: "variable undeclared/never assigned" error on "Public Shared" Panel Control VB Programmer Microsoft VB .NET 7 21st Oct 2003 05:05 PM
HELP: "variable undeclared/never assigned" error on "Public Shared" Panel Control VB Programmer Microsoft VB .NET 0 20th Oct 2003 09:35 PM


Features
 

Advertising
 

Newsgroups
 


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