I"ve created a userform I want it set up like a database form so i can enter records of info into a spreadsheet. My question is How can I link my text boxes to a spreadsheet.
You can do this in the following way. Assming that your form name is userform1 and the texbox is textbox1, you can link the cells in the worksheet to the textbox value as
Not sure if i follow your requirements, but are you wanting the form to update the spreadsheet and move you to the next field?
In that case, you'll need to use the exit event. If the user presses return, uses tab or the mouse to move to another field, this event is called. So put the cell = textbox code into that event. It should tab automatically to the next field.
Double click your text box in design mode and select the event exit. Type in the:
Activeworkbook.sheets(1).cells(1,1).value = userform1.textbox1.value
provide by lambuhere and robert's your father's brother.
This would be a lot easier with control arrays by the way. Anyone know how to dupe them in VBA.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.