Results 1 to 2 of 2

VBA save file

Threaded View

  1. #1
    Registered User
    Join Date
    08-30-2019
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    4

    VBA save file

    Hi,

    What i have currently is a query that fetches a table to a sheet. I want to build a macro that exports the table to a new workbook and saves it to a custom folder.
    Therefore what i need to do is:

    Determine What to save (Table), this is always the same table, even though the table range varies based on the query data.
    Determine Where to save and with what name (which folder), this should be a box that the user determines the place
    Determine the saved format as xlsx

    As i am very new, what i have so far is:

    Sub Save_Workbook_NewName()
    
        Dim workbook_Name As Variant
        workbook_Name = Application.GetSaveAsFilename
        ActiveWorkbook.SaveAs _
            Filename:=workbook_Name, _
            FileFormat:=51
        
    End Sub
    >> This however saves just a "file", not even xlsx.
    Could someone help me build a saving macro with the guidance above?

    Thank you!
    Last edited by AliGW; 08-31-2019 at 12:46 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. file save as tab delimited change to direct file save
    By bkanealy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-13-2016, 02:15 PM
  2. save as which remains the master file and save new file
    By ash3angel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-16-2015, 04:13 AM
  3. Macro needed to open "File Save As" and change save file type
    By blainerhett in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 02:40 PM
  4. Replies: 1
    Last Post: 09-05-2013, 02:39 PM
  5. Save as macro that specifies file type, file location and takes file name from three cells
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-13-2013, 10:09 PM
  6. Replies: 0
    Last Post: 01-27-2013, 12:13 PM
  7. [SOLVED] Excell2003 (SP-1) File > Save and File > Save As.. grayed out
    By Joe Murphy in forum Excel General
    Replies: 0
    Last Post: 03-09-2005, 06:06 PM

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