+ Reply to Thread
Results 1 to 3 of 3

Thread: Input Box Help

  1. #1
    Lisa
    Guest

    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

  2. #2
    FSt1
    Guest

    RE: 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


  3. #3
    Lisa
    Guest

    RE: 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0