Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a variable with .LookIn
Thanks for that Bob,
I have crossed that bridge now only to find another small hill to climb! Again FileSearch I am afraid...... I can find the relevant files using a hardcoded value in the .LookIn ...... With Application.FileSearch .NewSearch .LookIn = "Q:\$FamilyMan\FamilyMan 1\QARun Database" '.SearchSubFolders = True .Filename = "*.mdb" however when I use the variable that we discussed on friday...... Set fs = Application.FileSearch With fs .NewSearch .LookIn = """" & ParentDir & "\" & DbaseArra (iArrayElement) & """" it fails to find anything. As you can see from the following it appears that the value is being held correctly from the immediate window... ? """" & ParentDir & "\" & DbaseArray(iArrayElement) & """" "Q:\$FamilyMan\FamilyMan 1\QARun Database" I am wondering (being the newbie that I am!) is there any issue with variable type etc - I note that "fs" is defined as a string which I think is correct. Any help would be appreciated. Thanks, Mike. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
Lookin property of the FileSearch object | New Users to Excel | |||
variable height variable width stacked bar charts | Charts and Charting in Excel | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions |