![]() |
Input Box Help
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 |
Input Box Help
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 |
Input Box Help
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 |
All times are GMT +1. The time now is 11:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com