Hey all, feeling very dumb here. I'm trying to make a simple userform with one textbox, and when the user hits the "Retire" button it will input the data from the textbox into a specific cell (B14 in my case). This feels very simple and I've done it before, but for some reason I can't get it to work... Case of the Mondays?
Anyway, here's my current code for the box
Eventually I'll also tie to to a macro by using Call after the Unload me, but I can't get this simple thing to work. Any ideas?
EDIT:
Also, should've noted. The textbox is named "Code" and the worksheet it's on is New Motifs. (Figured I'd add, although you should be able to gather it from the code.
Anyway, here's my current code for the box
Code:
Private Sub RetireButton_Click()
Set ssheet = ThisWorkbook.Sheets("New Motifs")
ssheet.Cells(2, 14) = tbCode
Unload Me
End Sub
Eventually I'll also tie to to a macro by using Call after the Unload me, but I can't get this simple thing to work. Any ideas?
EDIT:
Also, should've noted. The textbox is named "Code" and the worksheet it's on is New Motifs. (Figured I'd add, although you should be able to gather it from the code.
Last edited by a moderator: