Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookin property of the FileSearch object | New Users to Excel | |||
xls property | Excel Programming | |||
Property Set | Excel Programming | |||
Width property | Excel Programming | |||
Using a variable with .LookIn | Excel Programming |