Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Find arguments

When I use Find in code, I generally want a "no-frills" find, so
Set c = Cells.Find("abc")
works just fine to find "abc" in the values, any part of the values,
ignoring case. But, testing this, I see that if the user has set find
options differently, find remembers and searches according to those rules.
Rats! So I have to include arguments, like
Set c = Cells.Find("abc", LookIn:=xlValues, lookat:=xlPart,
MatchCase:=False)
Is there anyway to set find back to "no frills", or default settings, so I
don't have to include all those arguments? TIA, James


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Find arguments

I'm afraid not. If those are the arguments you want .Find to use, and there
is a chance that they would be changed in the worksheet, then you have done
what needs to be done. Your only alternative would be to close Excel and
re-open it. The default settings would then be re-applied. Probably not what
you want to do.

Mike F
"Zone" wrote in message
...
When I use Find in code, I generally want a "no-frills" find, so
Set c = Cells.Find("abc")
works just fine to find "abc" in the values, any part of the values,
ignoring case. But, testing this, I see that if the user has set find
options differently, find remembers and searches according to those rules.
Rats! So I have to include arguments, like
Set c = Cells.Find("abc", LookIn:=xlValues, lookat:=xlPart,
MatchCase:=False)
Is there anyway to set find back to "no frills", or default settings, so I
don't have to include all those arguments? TIA, James




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Find arguments

Thank you, Mike. If I remember my basic rules about arguments, I could
include them without the argument names if I have them in the right order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go. I hope I haven't
given anyone bad advice in here. I'll just include the arguments (and their
names) with Find from now on. Regards, James

"Mike Fogleman" wrote in message
m...
I'm afraid not. If those are the arguments you want .Find to use, and
there is a chance that they would be changed in the worksheet, then you
have done what needs to be done. Your only alternative would be to close
Excel and re-open it. The default settings would then be re-applied.
Probably not what you want to do.

Mike F
"Zone" wrote in message
...
When I use Find in code, I generally want a "no-frills" find, so
Set c = Cells.Find("abc")
works just fine to find "abc" in the values, any part of the values,
ignoring case. But, testing this, I see that if the user has set find
options differently, find remembers and searches according to those
rules. Rats! So I have to include arguments, like
Set c = Cells.Find("abc", LookIn:=xlValues, lookat:=xlPart,
MatchCase:=False)
Is there anyway to set find back to "no frills", or default settings, so
I don't have to include all those arguments? TIA, James






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Find arguments


"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I could
include them without the argument names if I have them in the right order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.


And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart, MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Find arguments

Exactly, Rick!
"Rick Rothstein (MVP - VB)" wrote in
message ...

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I could
include them without the argument names if I have them in the right
order. But it's probably more trouble than it's worth (and definitely
more dangerous) to try to remember where all those commas go.


And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Find arguments

Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I could
include them without the argument names if I have them in the right order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.


And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart, MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Find arguments

LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.


And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick


--

Dave Peterson


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Find arguments

gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I
could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick


--

Dave Peterson




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Find arguments

No, I saw the gd&r... I gave you a LOL in return.

Rick


"Zone" wrote in message
...
gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I
could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

--

Dave Peterson





  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Find arguments

Whoops! The gd&r wasn't yours, was it? Ignore my other post... the gd&r
means "grin, duck and run".

Rick


"Zone" wrote in message
...
gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I
could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

--

Dave Peterson







  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Find arguments

ty, Rick. I'm up to speed again! ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
Whoops! The gd&r wasn't yours, was it? Ignore my other post... the gd&r
means "grin, duck and run".

Rick


"Zone" wrote in message
...
gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I
could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

--

Dave Peterson






  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Find arguments

ty????
<gd&rvvf

(Thank you)
(Grin, duck and running, very very fast)

Zone wrote:

ty, Rick. I'm up to speed again! ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
Whoops! The gd&r wasn't yours, was it? Ignore my other post... the gd&r
means "grin, duck and run".

Rick


"Zone" wrote in message
...
gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I
could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

--

Dave Peterson





--

Dave Peterson
  #13   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Find arguments

thank you, maybe????

"Dave Peterson" wrote:

ty????
<gd&rvvf

(Thank you)
(Grin, duck and running, very very fast)

Zone wrote:

ty, Rick. I'm up to speed again! ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
Whoops! The gd&r wasn't yours, was it? Ignore my other post... the gd&r
means "grin, duck and run".

Rick


"Zone" wrote in message
...
gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I
could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

--

Dave Peterson





--

Dave Peterson

  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Find arguments

I think so, too.

JMB wrote:

thank you, maybe????

"Dave Peterson" wrote:

ty????
<gd&rvvf

(Thank you)
(Grin, duck and running, very very fast)

Zone wrote:

ty, Rick. I'm up to speed again! ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
Whoops! The gd&r wasn't yours, was it? Ignore my other post... the gd&r
means "grin, duck and run".

Rick


"Zone" wrote in message
...
gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument a
"given"... not too many people I know decide to place a first argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about arguments, I
could
include them without the argument names if I have them in the right
order.
But it's probably more trouble than it's worth (and definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you might be
reviewing your code for some reason. Which of these do you think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

--

Dave Peterson





--

Dave Peterson


--

Dave Peterson
  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Find arguments

tyvm, although maybe tmi for this ng, imho! <gd&r

"Dave Peterson" wrote in message
...
I think so, too.

JMB wrote:

thank you, maybe????

"Dave Peterson" wrote:

ty????
<gd&rvvf

(Thank you)
(Grin, duck and running, very very fast)

Zone wrote:

ty, Rick. I'm up to speed again! ;)

"Rick Rothstein (MVP - VB)" wrote
in
message ...
Whoops! The gd&r wasn't yours, was it? Ignore my other post... the
gd&r
means "grin, duck and run".

Rick


"Zone" wrote in message
...
gd&r? Huh? Am I losing my web savvy? ;)

"Rick Rothstein (MVP - VB)"
wrote in
message ...
LOL.. Well, yeah, technically, but I consider the first argument
a
"given"... not too many people I know decide to place a first
argument
(whether it be "What" or anything thing else) out of sequence.

Rick


"Dave Peterson" wrote in message
...
Or even:
Set c=Cells.Find(what:="abc", ...

<gd&r



"Rick Rothstein (MVP - VB)" wrote:

"Zone" wrote in message
...
Thank you, Mike. If I remember my basic rules about
arguments, I
could
include them without the argument names if I have them in the
right
order.
But it's probably more trouble than it's worth (and
definitely more
dangerous) to try to remember where all those commas go.

And much, much harder to read at some future date when you
might be
reviewing your code for some reason. Which of these do you
think you
would
be able to figure out some months after you wrote them?

Set c=Cells.Find("abc", LookIn:=xlValues, LookAt:=xlPart,
MatchCase:=False)

Set c=Cells.Find("abc", , xlValues, xlPart, , , False)

Rick

--

Dave Peterson





--

Dave Peterson


--

Dave Peterson



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
Arguments Ra Excel Discussion (Misc queries) 2 July 15th 09 06:00 PM
IF-more than 7 arguments in Carolina Excel Worksheet Functions 2 May 20th 08 08:46 PM
arguments gemini0662 Excel Discussion (Misc queries) 9 July 13th 06 03:48 PM
Are there too many arguments Pat Excel Worksheet Functions 4 January 13th 05 03:54 AM
Where can I find other arguments & desc to the Workbooks.open("myfile.xls") cmd? wellie Excel Programming 0 July 9th 03 11:32 PM


All times are GMT +1. The time now is 04:09 AM.

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

About Us

"It's about Microsoft Excel"