Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
could some one solve this problem for me!!!
I have a technical problem with Excel. I have got it all working quite
well. Part of the process is to load a second worksbook that contains
all the stored files.
Is there a way of loading it using some simple letters, just simply
looking at the same folder where the first workbook is stored.
At the moment I load it using the whole pathway starting from C.
This will cause problems when I try to get others to try it out.

thank u
 
I think what you're looking for is the
Code:
ThisWorkBook.Path
property. You can use it to construct the full path-filename of any related files in the same folder.
Rob
 
If you need to process all the workbooks in a directory.....

Dim strFileName As String

strFileName = Dir(<path of files> & &quot;\*.XLS&quot;, vbNormal)

While strFileName <> vbNullString
'<open and process workbook indicated by strFileName>

strFileName = Dir
Wend

M :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top