Input Box Help

G

Guest

I recorded the following macro to copy and insert a new daily report sheet
and then it protects the sheet so my guys dont change my formulas.

What I need now is to add code to the end of this macro to bring up an input
box to change the tab name to a user defined date. How do I do this?

Thanks in advance,
Lisa

Sub NewSheet()
'
' NewSheet Macro
' New Formatted Sheet
'
' Keyboard Shortcut: Ctrl+n
'
Sheets("Blank Sheet").Select
Sheets("Blank Sheet").Copy After:=Worksheets(Worksheets.Count)
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
 
G

Guest

hi
you could add something like this...

dim nsn as string
nsn = inputbox("Enter a sheet name.")
sheets("blank sheet").name = nsn

regards
FSt1
 
G

Guest

Thanks alot, that worked fine.

FSt1 said:
hi
you could add something like this...

dim nsn as string
nsn = inputbox("Enter a sheet name.")
sheets("blank sheet").name = nsn

regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top