Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Hide and seek

Hi all,
XL2003
I am using the following lines in part of a proceedu

With Sheets(A).Range("D9:D1000")
Set C = .Find(B, LookIn:=xlValues)
If Not C Is Nothing Then
(More code here...)

This works as expected, until I hide column D on Sheets(A). (ie: when D:D is
hidden, C is Nothing). I would really like to keep this column hidden. Is
there a reasonably tidy solution, or does the 'Find' function intentionally
overlook hidden cells.
Thanks in advance.
Regards - Dave.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hide and seek

It's better to specify all the parms to the .find method. If you don't, you'll
be inheriting the settings from the last .find -- either in code or manually by
the user.

Then try looking in xlformulas.

Dave wrote:

Hi all,
XL2003
I am using the following lines in part of a proceedu

With Sheets(A).Range("D9:D1000")
Set C = .Find(B, LookIn:=xlValues)
If Not C Is Nothing Then
(More code here...)

This works as expected, until I hide column D on Sheets(A). (ie: when D:D is
hidden, C is Nothing). I would really like to keep this column hidden. Is
there a reasonably tidy solution, or does the 'Find' function intentionally
overlook hidden cells.
Thanks in advance.
Regards - Dave.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Hide and seek

Hi Dave,
Thanks for that. Works a treat now. I got the 'xlValues' from the
Find-example in the VBA help.
Can you tell me why 'xlFormulas' works, since the number I'm Finding isn't a
formula, or contained within a formula?
And also why it works on hidden cells when 'xlValues' doesn't?
And how do you know these things?
And yes, I did ask a lot of questions when I was a kid.
Regards - Dave.

"Dave Peterson" wrote:

It's better to specify all the parms to the .find method. If you don't, you'll
be inheriting the settings from the last .find -- either in code or manually by
the user.

Then try looking in xlformulas.

Dave wrote:

Hi all,
XL2003
I am using the following lines in part of a proceedu

With Sheets(A).Range("D9:D1000")
Set C = .Find(B, LookIn:=xlValues)
If Not C Is Nothing Then
(More code here...)

This works as expected, until I hide column D on Sheets(A). (ie: when D:D is
hidden, C is Nothing). I would really like to keep this column hidden. Is
there a reasonably tidy solution, or does the 'Find' function intentionally
overlook hidden cells.
Thanks in advance.
Regards - Dave.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hide and seek

I have no idea why there's a difference.

And I either learned it here in the newsgroups or by trial and error and had a
eureka moment.

Dave wrote:

Hi Dave,
Thanks for that. Works a treat now. I got the 'xlValues' from the
Find-example in the VBA help.
Can you tell me why 'xlFormulas' works, since the number I'm Finding isn't a
formula, or contained within a formula?
And also why it works on hidden cells when 'xlValues' doesn't?
And how do you know these things?
And yes, I did ask a lot of questions when I was a kid.
Regards - Dave.

"Dave Peterson" wrote:

It's better to specify all the parms to the .find method. If you don't, you'll
be inheriting the settings from the last .find -- either in code or manually by
the user.

Then try looking in xlformulas.

Dave wrote:

Hi all,
XL2003
I am using the following lines in part of a proceedu

With Sheets(A).Range("D9:D1000")
Set C = .Find(B, LookIn:=xlValues)
If Not C Is Nothing Then
(More code here...)

This works as expected, until I hide column D on Sheets(A). (ie: when D:D is
hidden, C is Nothing). I would really like to keep this column hidden. Is
there a reasonably tidy solution, or does the 'Find' function intentionally
overlook hidden cells.
Thanks in advance.
Regards - Dave.


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Hide and seek

Ok, eureka moment. That's cool...
Thanks for replying
Dave.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help With Goal Seek Laura[_3_] New Users to Excel 6 August 3rd 08 06:32 PM
Goal Seek with dynamic Goal Seek Dkline Excel Programming 1 February 18th 08 10:00 AM
Goal Seek Fortune Excel Programming 1 April 7th 07 03:30 PM
.Seek gottahavit Excel Programming 1 September 13th 05 06:36 PM
Hide and Seek oberon.black[_24_] Excel Programming 4 September 10th 05 03:39 PM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"