Simple Question..if there is such a thing in Excel
Hi Gang,
I used the "Save" and also the "SaveAs" command in a module but didn't specify a path.....I always thought that if no path was specified, the Save would follow the path that the file was opened from.....apparently not....the Save and the SaveAs, in my case, saved to "My Documents". This is not where the file was opened from. However, I was able to deal with this by specifying a complete path in the "Save" command. Is this normal behavior for VBA and is it necessary in all cases to specify a complete path? TIA, Don |
Simple Question..if there is such a thing in Excel
you can use something like fpath = thisworkbook.path
this will give you the path of the opened workbook i always use fPath = ThisWorkbook.Path & "\" -- Gary "Don" wrote in message ... Hi Gang, I used the "Save" and also the "SaveAs" command in a module but didn't specify a path.....I always thought that if no path was specified, the Save would follow the path that the file was opened from.....apparently not....the Save and the SaveAs, in my case, saved to "My Documents". This is not where the file was opened from. However, I was able to deal with this by specifying a complete path in the "Save" command. Is this normal behavior for VBA and is it necessary in all cases to specify a complete path? TIA, Don |
Simple Question..if there is such a thing in Excel
Thanks for the reply Gary, I'll give that a try. Learn something new
everyday on here.....thanks to all you guys and gals. Don "Gary Keramidas" wrote: you can use something like fpath = thisworkbook.path this will give you the path of the opened workbook i always use fPath = ThisWorkbook.Path & "\" -- Gary "Don" wrote in message ... Hi Gang, I used the "Save" and also the "SaveAs" command in a module but didn't specify a path.....I always thought that if no path was specified, the Save would follow the path that the file was opened from.....apparently not....the Save and the SaveAs, in my case, saved to "My Documents". This is not where the file was opened from. However, I was able to deal with this by specifying a complete path in the "Save" command. Is this normal behavior for VBA and is it necessary in all cases to specify a complete path? TIA, Don |
All times are GMT +1. The time now is 09:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com