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

How can i reset this property, with out closing down and
reopening Excel.

Trying to do many file searches in different Dir within
one Marco.

the property .newsearch only resets the file name to
search for.

Any help?

THanks Simon
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Lookin Property.

Just set the property for each search

With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"




--
Regards,
Tom Ogilvy

"Simon" wrote in message
...
How can i reset this property, with out closing down and
reopening Excel.

Trying to do many file searches in different Dir within
one Marco.

the property .newsearch only resets the file name to
search for.

Any help?

THanks Simon



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Lookin Property...still not working

Thank you Tom
but i have create the following

If loop = 1 then
f_dir = "C:\"
else
f_dir = "D:\"
endif

With Application.FileSearch
.NewSearch
.LookIn = f_dir

and call this a couple of times. The Lookin value does not
change

Regards

Simon

-----Original Message-----
Just set the property for each search

With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"




--
Regards,
Tom Ogilvy

"Simon" wrote in message
...
How can i reset this property, with out closing down and
reopening Excel.

Trying to do many file searches in different Dir within
one Marco.

the property .newsearch only resets the file name to
search for.

Any help?

THanks Simon



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Lookin Property...still not working

Not a good idea to use the word loop as a variable, it is VBA reserved
word.

And where is the loop that increments that variable?

Change it and try again. Why did you not get a compile error?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Simon" wrote in message
...
Thank you Tom
but i have create the following

If loop = 1 then
f_dir = "C:\"
else
f_dir = "D:\"
endif

With Application.FileSearch
.NewSearch
.LookIn = f_dir

and call this a couple of times. The Lookin value does not
change

Regards

Simon

-----Original Message-----
Just set the property for each search

With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"




--
Regards,
Tom Ogilvy

"Simon" wrote in message
...
How can i reset this property, with out closing down and
reopening Excel.

Trying to do many file searches in different Dir within
one Marco.

the property .newsearch only resets the file name to
search for.

Any help?

THanks Simon



.



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
Lookin property of the FileSearch object [email protected] New Users to Excel 0 December 5th 06 09:37 PM
xls property 71marco71[_12_] Excel Programming 1 February 13th 04 01:02 AM
Property Set Bob Phillips[_6_] Excel Programming 0 February 4th 04 09:24 PM
Width property jim c. Excel Programming 1 September 21st 03 11:03 PM
Using a variable with .LookIn Mike Berry Excel Programming 0 July 14th 03 12:29 PM


All times are GMT +1. The time now is 11:31 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"