+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] visual basic command identify a worksheet in a workbook

  1. #1
    F.C
    Guest

    [SOLVED] visual basic command identify a worksheet in a workbook

    A staff member produced an insert macro using visual basic editor in excel
    When I attempt to insert a sheet, the macro always selects the first sheet
    of a multipal book. The following command has been used.
    Sheets ("Command Page").Select

    How can I identify a specfic sheet in a workbook

  2. #2
    Tom Ogilvy
    Guest

    Re: visual basic command identify a worksheet in a workbook

    perhaps

    to get the last sheet as an example.

    With thisworkbook
    .Worksheets(.Worksheets.count).Select
    End With

    or you can specify a specific sheet,

    Worksheets("MyNewSheet").Select

    but that is what you are already doing.

    --
    Regards,
    Tom Ogilvy

    "F.C" <F.C@discussions.microsoft.com> wrote in message
    news:E712717A-96DC-482C-8845-688782036F23@microsoft.com...
    > A staff member produced an insert macro using visual basic editor in excel
    > When I attempt to insert a sheet, the macro always selects the first sheet
    > of a multipal book. The following command has been used.
    > Sheets ("Command Page").Select
    >
    > How can I identify a specfic sheet in a workbook




  3. #3
    F.C
    Guest

    Re: visual basic command identify a worksheet in a workbook

    Dear Tom


    I ended up doing the following

    Worksheets("Export").Select

    Thank you for your help

    Kind Regards
    Frank



    "Tom Ogilvy" wrote:

    > perhaps
    >
    > to get the last sheet as an example.
    >
    > With thisworkbook
    > .Worksheets(.Worksheets.count).Select
    > End With
    >
    > or you can specify a specific sheet,
    >
    > Worksheets("MyNewSheet").Select
    >
    > but that is what you are already doing.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "F.C" <F.C@discussions.microsoft.com> wrote in message
    > news:E712717A-96DC-482C-8845-688782036F23@microsoft.com...
    > > A staff member produced an insert macro using visual basic editor in excel
    > > When I attempt to insert a sheet, the macro always selects the first sheet
    > > of a multipal book. The following command has been used.
    > > Sheets ("Command Page").Select
    > >
    > > How can I identify a specfic sheet in a workbook

    >
    >
    >


+ 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