Results 1 to 2 of 2

Thread: Changing to a other sheet in Excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    1

    Post

    Dear vb users,

    When I have started Excel in VB5, I want to change to an other sheet.

    Code:
    Dim XLsheet As Object

    Set XLsheet = GetObject("c:\book.xls")
    XLsheet.Application.Visible = True

    Worksheets("test").Activate

    In the last sentence occurred an error:

    Method 'Worksheet' of object '_global' failed

    What do I wrong?
    Knows someone a other source?

    Mary

  2. #2
    New Member
    Join Date
    Jan 2000
    Location
    Blackpool
    Posts
    14

    Post

    you have to add the dollar sign onto the end of a worksheet name so "sheet1$"

Posting Permissions

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



Click Here to Expand Forum to Full Width