Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi , have tried activate and still get same error message?
any more ideas |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message oups.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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Select method of Range class failed" Error | Excel Discussion (Misc queries) | |||
Run-time error "1004" Select method of range class failed | Excel Discussion (Misc queries) | |||
VBA error 1004 "Select method of Range class failed" | Excel Programming | |||
Error 1004, "select method of range class failed" | Excel Programming | |||
Runtime Error "1004" Select Method of Range Class Failed | Excel Programming |