Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My code seems to fail because I am searching a value in a
hidden sheet. Any idea? I get the following message (runtime error 1004, activate method out of range class failed) Dim Cell As Range Set Cell = Range("List").Find(What:=Range("nametofind")) Cell.Activate PS: list and nametofind are defined names |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
you can't activate a cell on a hidden sheet (but this is not necessary in most cases). If you just want the value use Dim Cell As Range Set Cell = Range("List").Find(What:=Range("nametofind")) msgbox cell.address -- Regards Frank Kabel Frankfurt, Germany caroline wrote: My code seems to fail because I am searching a value in a hidden sheet. Any idea? I get the following message (runtime error 1004, activate method out of range class failed) Dim Cell As Range Set Cell = Range("List").Find(What:=Range("nametofind")) Cell.Activate PS: list and nametofind are defined names |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks it works.
SO it must be something else in my code that does not agree with the hidden sheet. I am a bit confused, because I use "activate" all the time on hidden sheet and it usually works. -----Original Message----- Hi you can't activate a cell on a hidden sheet (but this is not necessary in most cases). If you just want the value use Dim Cell As Range Set Cell = Range("List").Find(What:=Range("nametofind")) msgbox cell.address -- Regards Frank Kabel Frankfurt, Germany caroline wrote: My code seems to fail because I am searching a value in a hidden sheet. Any idea? I get the following message (runtime error 1004, activate method out of range class failed) Dim Cell As Range Set Cell = Range("List").Find(What:=Range ("nametofind")) Cell.Activate PS: list and nametofind are defined names . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
so post your complete code :-) Note: Activate should be avoided as this will slow down your macro and is in most cases not required -- Regards Frank Kabel Frankfurt, Germany "caroline" schrieb im Newsbeitrag ... Thanks it works. SO it must be something else in my code that does not agree with the hidden sheet. I am a bit confused, because I use "activate" all the time on hidden sheet and it usually works. -----Original Message----- Hi you can't activate a cell on a hidden sheet (but this is not necessary in most cases). If you just want the value use Dim Cell As Range Set Cell = Range("List").Find(What:=Range("nametofind")) msgbox cell.address -- Regards Frank Kabel Frankfurt, Germany caroline wrote: My code seems to fail because I am searching a value in a hidden sheet. Any idea? I get the following message (runtime error 1004, activate method out of range class failed) Dim Cell As Range Set Cell = Range("List").Find(What:=Range ("nametofind")) Cell.Activate PS: list and nametofind are defined names . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding min date value with hidden zeros with vlookup | Excel Worksheet Functions | |||
Finding all cells that are locked/hidden | Excel Discussion (Misc queries) | |||
I need my Hidden Rows to stay hidden when I print the sheet. | Excel Discussion (Misc queries) | |||
Saving hidden data with a worksheet (preferably without using a hidden sheet) | Excel Programming | |||
Problem pasting a row from a hidden sheet to the first free row on another visible sheet | Excel Programming |