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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox values from worksheets

Status
Not open for further replies.

garethbriggs

Technical User
Apr 8, 2003
1
GB
Dear All

I'm pretty new to VBA but i'm sure what i want to do is quite simple.

I have created a userform which performs some complex maths on a series of inputs. However if i close the Userform and go back to Excel and then reload the form i have to re-enter all the inputs again.

To solve this I have tried to add a simple Yes No form which loads before my main form and asks whether you want to use the previous sessions input data (which is stored in an Excel sheet).

If 'yes' is clicked the code should set the textbox values in the main form to those stored in Excel... but it doesn't!! Is there anything i'm missing? Do commands in one form which relate directly to another need any special definition?

The code which relates the Excel values to the form is shown below...

textbox.text = Worksheets("Sheetname").Cells(2, 1).value

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top