I'm using a userform to create a new sheet. The form already creates the sheet and names it what was typed into the userform. Now I want it to place that variable in a cell along with a string. the following code will place the variable from the form (tbname) into cell b5.
Private Sub Ok_Click()
ActiveWorkbook.Sheets.Add(After:=Worksheets("Overview"), Type:="C:\My Documents\Credit\FinancialsTemplate.xltx").name = Me.tbname
Range("B5") = Me.tbname
Unload Me
End Sub
I want it do something like this:
Private Sub Ok_Click()
ActiveWorkbook.Sheets.Add(After:=Worksheets("Overview"), Type:="C:\My Documents\Credit\FinancialsTemplate.xltx").name = Me.tbname
Range("B5") = "Client Name: " Me.tbname
Unload Me
End Sub
Bookmarks