Hi,
I hope someone could help me with a query I have.
I'm using a the below macro to create new worksheets to an workbook.
Sub CreateNewSheet()Dim sName As String
Sheets("Draw Data").Copy after:=ActiveSheet
sName = InputBox("Enter new sheet name")
On Error Resume Next
ActiveSheet.Name = sName
If Err <> 0 Then MsgBox "Name not valid"
Err.Clear
On Error GoTo 0
End Sub
This macro works fine, as an addition I want the sheet name that was entered to appear on cell B3 within the worksheet.
Could this be achieved?
Please advise.
Thanks.
I hope someone could help me with a query I have.
I'm using a the below macro to create new worksheets to an workbook.
Sub CreateNewSheet()Dim sName As String
Sheets("Draw Data").Copy after:=ActiveSheet
sName = InputBox("Enter new sheet name")
On Error Resume Next
ActiveSheet.Name = sName
If Err <> 0 Then MsgBox "Name not valid"
Err.Clear
On Error GoTo 0
End Sub
This macro works fine, as an addition I want the sheet name that was entered to appear on cell B3 within the worksheet.
Could this be achieved?
Please advise.
Thanks.