Results 1 to 2 of 2

SaveAs Directory Changing

Threaded View

  1. #1
    Registered User
    Join Date
    01-22-2014
    Location
    San Diego
    MS-Off Ver
    2010
    Posts
    23

    SaveAs Directory Changing

    I have a macro that I run that formats a csv file and I would like to output a xlsx file. I'm using this SaveAs

    msgbox ThisWorkbook.Path
    Dim relativePath As String
        relativePath = ThisWorkbook.Path & "\" & ActiveWorkbook.Name
        ActiveWorkbook.SaveAs Filename:=ActiveSheet.Name, FileFormat:=51
    My problem is when I use the above code, my msgbox shows: (which i think is due to pre-existing macros my company uses in excel.)

    Users\...\appdata\roaming\microsoft\XLSTART
    However, the files are actually saved in

    C:\Users\...\Desktop\AGED REPORTS

    How to I get the actual location of the csv file instead of the one that thisworkbook.path returns?
    Last edited by dusto; 03-10-2014 at 02:02 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Dialogs SaveAs with different directory
    By Thomas Stroebel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-10-2014, 06:47 PM
  2. [SOLVED] SaveAs Filename as Current Directory
    By JonesZoid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2013, 07:22 PM
  3. Changing SaveAs Dialog Box
    By McNulty in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2009, 11:54 AM
  4. SaveAs to same directory but different file name
    By johnnywinter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2009, 02:42 PM
  5. Using SaveAs & changing the path a file is saved at
    By penny in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-07-2008, 11:24 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1