garethbriggs
Technical User
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
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"