![]() |
How to get file's current directory path to a string in VBA?
In my VBA I needed to get some data from another Excel
file located in the same directory with current host excel file.How could I got the current file's path ,something the same as "../" in UNIX? Thanks! |
How to get file's current directory path to a string in VBA?
Sub test()
Dim sPath As String sPath = ActiveWorkbook.Path MsgBox sPath End Sub -- HTH. Best wishes Harald Followup to newsgroup only please. " wrote in message ... In my VBA I needed to get some data from another Excel file located in the same directory with current host excel file.How could I got the current file's path ,something the same as "../" in UNIX? Thanks! |
All times are GMT +1. The time now is 01:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com