Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This failed as you noted:
Sub tester1() Rows(1).Value = "Z" Range("M1").Value = "A" Set oWorksheet = ActiveSheet Range("A:AA").EntireColumn.Hidden = True vColName = "A" Set oFound = oWorksheet.Rows(1).Find(vColName, _ LookIn:=xlValues, LookAt:=xlWhole) If Not oFound Is Nothing Then Debug.Print oFound.Address Else Debug.Print "Not found" End If End Sub This Worked - using xlFormulas rather than xlValues Sub tester2() Rows(1).Value = "Z" Range("M1").Value = "A" Set oWorksheet = ActiveSheet Range("A:AA").EntireColumn.Hidden = True vColName = "A" Set oFound = oWorksheet.Rows(1).Find(vColName, _ LookIn:=xlFormulas, LookAt:=xlWhole) If Not oFound Is Nothing Then Debug.Print oFound.Address Else Debug.Print "Not found" End If End Sub of course looking for something produced by a formula would not work. -- Regards, Tom Ogilvy "Michel" wrote in message m... "Bob Phillips" wrote: The fact that it is hidden should not stop you. What problem are you experiencing? Correct, the problem is that it can't be found! Set oFound = oWorksheet.Rows(1).Find(vColName, LookIn:=xlValues, LookAt:=xlWhole) so, the error comes from trying to use the oFound which in Nothing So I should have asked: How can I search in hidden columns? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da | Excel Discussion (Misc queries) | |||
Copy and Paste with hidden columns remaining hidden | Excel Discussion (Misc queries) | |||
Hidden rows columns won't stay hidden | Excel Worksheet Functions | |||
Hidden Columns No Longer Hidden after Copying Worksheet? | Excel Discussion (Misc queries) | |||
How to keep hidden columns hidden using protection | Excel Discussion (Misc queries) |