View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JasonSelf JasonSelf is offline
external usenet poster
 
Posts: 1
Default Storing and Retrieving Variables Question

I am trying to store a Variable that is acquired by a text box 'Input1'
from a form that I had created. On this form the button 'button1'
should call the variable stored in input1 and display it in a message
box...this is mostly me trying to learn how to use variables....I have
a nice book on VBA sitting next to me and I am somehow missing the
whole variable thing...here is an example of my code that doesn't
work....any tips would be much appreciated.


Public Sub box1_Change()
Dim Input1 As String
Input1 = box1.Value
End Sub
----------------------------------------
Sub button1_Click()
MsgBox Input1
End SubPublic Sub box1_Change()

For the record I haven't really nailed down the Public Sub, Private Sub
and Sub meanings so if that is also incorrect it wouldn't surprise
me...my book does go into that stuff.
Thank you,
Jason Self


---
Message posted from http://www.ExcelForum.com/