How to save a userfor textbox input as a global variable to use late?

zb134

New Member
Joined
Jun 23, 2014
Messages
38
So I am using the
Code:
Private Sub CommandButton1_Click()
to get some values from the user and most of them go to certain cells on my worksheet. However, there is one particular value (a dollar amount) that I do not want to store, but use later on to compare against a different value.

I tried declaring a public variable x and putting the value like
Code:
x=textbox10.value
but that doesn't work, I guess since its a Private sub.
Any help appreciated!
 

zb134

New Member
Joined
Jun 23, 2014
Messages
38
Please ignore...I found out that I can assign the value to a name variable and use it elsewhere.
 

Forum statistics

Threads
1,085,715
Messages
5,385,419
Members
401,945
Latest member
Paul82

Some videos you may like

This Week's Hot Topics

Top