Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The requested "the folder that the excel file that ran the macro is in" is actually
ThisWorkbook.Path -- HTH. Best wishes Harald Followup to newsgroup only please. "Steve Danielson [MS]" wrote in message ... Try: ThisFolder = ActiveWorkbook.Path If the workbook has been saved, this will give the folder in which it is saved. You don't need to use ActiveWorkbook if you have a reference already to the workbook for which you wish to receive the path. There is also an Application.Path property which gives the path to where the application is run from. Are you wanting the folder of a specific workbook that you load or some other folder? Steve For information and sample code for integrating Office with Visual Basic, Visual C++, Internet Scripts, and other programming languages, please see http://msdn.microsoft.com/library/te...SOfficeDev.htm. This site contains the most up-to-date information for using developer tools for Office integration and extensibility. Best regards, Steve Danielson Microsoft Developer Support This posting is provided "AS IS" with no warranties, and confers no rights. Are you secure? Please visit the Microsoft Security & Privacy Center (http://www.microsoft.com/security) for the latest news on security updates. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) | |||
File in use Dialog box | Excel Discussion (Misc queries) | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming |