![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I want to save my workbook using VBA. I wnat the open workbook to be saved in the same directory where it is residing. How do I complete the following?
Application.ThisWorkbook.SaveAS |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
The fact that you say that you want to save the workbook in the folder it is currently residing would imply that the workbook has been saved. Therefore, just use this:-
ThisWorkbook.Save If you want to create a second copy then use:- ThisWorkbook.SaveAs ThisWorkbook.Path & "anyoldname.xls" HTH, D |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks DK. Just what I was looking for.
Stan |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|