Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update default values

Status
Not open for further replies.

fezzer

Technical User
Mar 20, 2002
14
GB
Hi!

I have a form setup in Excel 97. One of it's functions is to input data into the spreadsheet. However when I go to the form again all the fields are clear even if I ask the form to place the values in the boxes:

S1TextPlace.Text = [Place]

Is there anyway I can update all these fields once the form opens so they appear on the form?

Thanks

Fez
 
Easiest way is to use global (i.e. public) variables in a code module.
Code:
Public sTextPlace as String

Then in the form code you can use
Code:
  sTextPlace = S1TextPlace.Text
to capture the data before closing the form and use
Code:
  S1TextPlace.Text = sTextPlace
to restore the data after opening the form.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top