Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
Runtime Error '91' Object variable or With block variable not set Alec Coliver Excel Discussion (Misc queries) 2 October 24th 09 02:29 PM
Lookin property of the FileSearch object [email protected] New Users to Excel 0 December 5th 06 09:37 PM
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM


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