Results 1 to 8 of 8

Create button to open sheet

Threaded View

  1. #1
    Registered User
    Join Date
    05-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Create button to open sheet

    I have code that creates a new sheet in the active workbook and requires input to name the sheet. My problem is that I also need to create a button on sheet1 that opens the newly created sheet and names the button the same as the sheet name.

    This is my code for creating the new sheet that works fine.
    Sub New_Contractor()
    '
    ' New_Contractor Macro
    'Creates a new sheet for a new contractor and names the sheet tab.
    '
        Sheet16.Visible = True
        Sheet16.Select
        Cells.Select
        Selection.Copy
        Sheets.Add After:=Sheets(Sheets.Count)
        ActiveSheet.Paste
        ActiveSheet.Name = InputBox("Please enter the name of the New Contractor")
        Range("F4").Select
        ActiveWindow.FreezePanes = True
        Range("b4").Select
        Sheet16.Visible = False
        
    End Sub
    Can anyone help me?
    Last edited by arlu1201; 05-16-2012 at 03:53 AM. Reason: Code tags needed here.

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.6.0 RC 1