+ Reply to Thread
Results 1 to 3 of 3

create msg box

  1. #1
    Anthony
    Guest

    create msg box

    Hi,
    Can anybody offer some code (as I'm new to this) to alow the user to input a
    name into a msg box and then search and display the corrct worksheet with
    that name.
    I thank you!

  2. #2
    Trevor Shuttleworth
    Guest

    Re: create msg box

    Anthony

    one way:

    Sub ActivateSheet()
    Dim sSheetName As String
    sSheetName = InputBox("Input Sheet Name", "Sheet Name", "Sheet1")
    If sSheetName = "" Then Exit Sub
    On Error Resume Next
    Sheets(sSheetName).Select
    On Error GoTo 0
    End Sub

    Regards

    Trevor


    "Anthony" <Anthony@discussions.microsoft.com> wrote in message
    news:443BE2D3-516A-4E0C-9A39-062BBFFE098D@microsoft.com...
    > Hi,
    > Can anybody offer some code (as I'm new to this) to alow the user to input
    > a
    > name into a msg box and then search and display the corrct worksheet with
    > that name.
    > I thank you!




  3. #3
    Anthony
    Guest

    Re: create msg box

    thanks Trevor - I'll give that a try

    "Trevor Shuttleworth" wrote:

    > Anthony
    >
    > one way:
    >
    > Sub ActivateSheet()
    > Dim sSheetName As String
    > sSheetName = InputBox("Input Sheet Name", "Sheet Name", "Sheet1")
    > If sSheetName = "" Then Exit Sub
    > On Error Resume Next
    > Sheets(sSheetName).Select
    > On Error GoTo 0
    > End Sub
    >
    > Regards
    >
    > Trevor
    >
    >
    > "Anthony" <Anthony@discussions.microsoft.com> wrote in message
    > news:443BE2D3-516A-4E0C-9A39-062BBFFE098D@microsoft.com...
    > > Hi,
    > > Can anybody offer some code (as I'm new to this) to alow the user to input
    > > a
    > > name into a msg box and then search and display the corrct worksheet with
    > > that name.
    > > I thank you!

    >
    >
    >


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