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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spreadsheet writes file to same location issue 1

Status
Not open for further replies.

TheLad

Technical User
Aug 3, 2001
3,846
GB
Guys

Lets say I have downloaded a spreadsheet from a document repository into C:\Temp. I go into the spreadsheet, run the VB Macro, and I want the output to be put into the same directory as the spreadsheet. Please can you advise how I can get the directory path name where the spreadsheet has been downloaded to?

If I just export the file without any location, it saves the file to My Documents.

Please can you help?

--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
ThisWorkbook.Path will give you the current directory of the workbook.
 
I knew it has to be something simple, thanks for the quick response

--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top