Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am working with a form which has a textbox that I am entering text into and
than passing the the string value entered into the text box on my form to a string variable. for example... Sub test() Dim MyTxtString as String MyForm.Show MyTxtString = MyForm.Mytextbox.value MyForm.Hide MsgBox (MyTxTString) End Sub() The problem is that the string from the textbox on MyForm does get assigned to MyTxtString variable, however as soon as the form his hidden the variable MyTxtString looses the value entered into the textbox and the value of MyTxtString becomes "" (nothing). How do I maintain the scope of MyTxtString to keep the value assigned to it even when the form is hidden ? I have already tried declaring MyTxtString as a Public Global variable but the scope and life of MyTxtString still is not maintained. What am I doing wrong ? Dan. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Set Textbox on a Form to Deafault | New Users to Excel | |||
text boxes retaining their last value on form close and restart | Excel Discussion (Misc queries) | |||
textbox on form | Excel Programming | |||
Separate String into string + value form | Excel Programming | |||
Retaining text formatting in TextBox | Excel Programming |