public variable question 
Author Message
 public variable question

In Office 2000 I am trying to set a public variable (The variable is Ans) with:
                public Ans
but it doesnt work!!! I have tried anding as Integer but keep getting error
reports
What can I do?
        Chris


Sat, 30 Apr 2005 10:05:17 GMT  
 public variable question
How about a little more information.

Where exactly are you putting the pubic variable and what error do you get?

Quote:

> In Office 2000 I am trying to set a public variable (The variable is Ans) with:
>                 public Ans
> but it doesnt work!!! I have tried anding as Integer but keep getting error
> reports
> What can I do?
>         Chris

--

Cheers
Andy

http://www.geocities.com/andy_j_pope/index.html



Sat, 30 Apr 2005 19:50:04 GMT  
 public variable question
Thanks for the reply
I am doing a VBA tutorial at:
http://www.vbatutor.com/vbatutor.htm
I'm doing part one Lesson three

If you look at the script for the Check Button, you will see that a Public
variable called 'Ans' has been declared. This means that it can be used by any
script within that project.

Public Ans
____________________________________
Private Sub CommandButton3_Click()
Dim Message
If  Ans = 1 then
Message = "TRUE"
Else
Message = "FALSE"
End If
MsgBox ("The Radio Button State is " + Message + "!")
End Sub

HEY !!! IVE JUST PUT IN "AS INTEGER" AND ITS STARTED WORKING OK !!!!!!

I tried the same thing before and got the error messages
          Perplexed
                        Chris



Mon, 02 May 2005 01:56:44 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Public Variable Question

2. public variables not public

3. Public Type vs. Public variable() as Double

4. Public variable not acting public (VB 5.0)

5. Question about Private/Public variable in Vb5.0

6. Use a public variable or use Private variable with Get and Set

7. Use multiple API calls or Global public variable?

8. NEED HELP WITH Public Variables

9. How to use Public Variables

10. Public variable.

11. Public variable in Access 2000

12. beginner's problem with referencing a public variable

 

 
Powered by phpBB® Forum Software