Using SaveAs
MZ Tools makes life easier for the Excel VBA coder
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Using SaveAs

  1. #1
    Guest

    Default

     
    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. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,936
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    Guest

    Default

      
    Thanks DK. Just what I was looking for.

    Stan

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com