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
hi
you could add something like this...
dim nsn as string
nsn = inputbox("Enter a sheet name.")
sheets("blank sheet").name = nsn
regards
FSt1
"Lisa" wrote:
> 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
Thanks alot, that worked fine.
"FSt1" wrote:
> hi
> you could add something like this...
>
> dim nsn as string
> nsn = inputbox("Enter a sheet name.")
> sheets("blank sheet").name = nsn
>
> regards
> FSt1
>
> "Lisa" wrote:
>
> > 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks