+ Reply to Thread
Results 1 to 6 of 6

Error Message "Select method of worksheet class failed"

  1. #1
    philc
    Guest

    Error Message "Select method of worksheet class failed"

    i get the above message whenever a document is opened read only. the
    document has the following code

    Private Sub Workbook_Open()

    Sheets("Homepage").Select

    and it fails on the first line. the problem is not present when the
    document is opened normally (ie not read only).
    there is no protection on any sheets, or any hidden sheets.

    Thanks in advance.


  2. #2
    Bill Renaud
    Guest

    Re: Error Message "Select method of worksheet class failed"

    Try:
    Sheets("HomePage").Activate

    I know the Object Browser does not list the "Activate" method for the
    "Sheets" class (Excel 2000), but that is what you generally use. As a
    general rule, you "Activate" worksheets, charts, workbooks, windows, the
    active cell, etc., and you "Select" ranges of cells, chart plot area, chart
    title, etc. The Help topics are a little confusing on this, but this seem to
    be a common problem.

    The Activate method is listed for the "Worksheet" and "Chart" classes in the
    Object Browser, however.
    --
    Regards,
    Bill



  3. #3
    philcud
    Guest

    Re: Error Message "Select method of worksheet class failed"

    hi , have tried activate and still get same error message?
    any more ideas


  4. #4
    Bill Renaud
    Guest

    Re: Error Message "Select method of worksheet class failed"

    Actually, my tests show that your code should also work as is. It does on my
    machine (Excel 2000 with SP-3). Do you have all Service Packs in place? What
    version are you running?

    --
    Regards,
    Bill



  5. #5
    philcud
    Guest

    Re: Error Message "Select method of worksheet class failed"

    hi bill, have reduced the size of the spreadsheet by removing all
    unnecessary formatting and the code now works without alterations. must
    have been a bug somewhere but i always get annoyed when i dont get to
    the solution.
    but could be worse things on a monday morning eh!
    thanks for your help.


  6. #6
    Bill Renaud
    Guest

    Re: Error Message "Select method of worksheet class failed"

    Maybe you had the sheet named differently than your code was expecting (i.e.
    a space in the name of the sheet, and no space in the code). Or a name clash
    somewhere (2 procedures with the same name in 2 different modules), but then
    you would think that the compiler would raise an error.
    --
    Regards,
    Bill

    "philcud" <philcuddy@gmail.com> wrote in message
    news:1115116767.799673.288860@o13g2000cwo.googlegroups.com...
    > hi bill, have reduced the size of the spreadsheet by removing all
    > unnecessary formatting and the code now works without alterations. must
    > have been a bug somewhere but i always get annoyed when i dont get to
    > the solution.
    > but could be worse things on a monday morning eh!
    > thanks for your help.
    >




+ 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