saveas method in vba

  1. R

    VBA to Copy Multiple sheets to new workbook & save as .xlsb or .xlsx

    Hi, I have a vba code that needs to copy an array of sheets from one workbook & paste as values to another workbook & save the destination workbook as either xlsx or xlsx. Below is the code: Sub SaveSheetsAsCSV() Dim ws As Worksheet, ws1 As Worksheet Dim newWorkbook As Workbook...
  2. M

    SaveAs VBA crashes excel

    Hi, Been a while since I posted last, but I have ran into a problem adding in a SaveAs routine to an existing macro. This is what I am trying to add in: On Error Resume Next With Application.FileDialog(msoFileDialogSaveAs) .Title = "Where do you want to save the file?"...
  3. Z

    VBA macro works on one computer but when other use it, it attempts to save to the wrong save path and runtime errors

    Hello, I have a Macro that un-shares the workbook then re-shares it after the macro has run. It works for me and when re-sharing it, it saves to the correct file path given in the vba. But when others in the office try it, it adds 7 or 8 random numbers at the end of the save address, then...
  4. M

    Run-time error '1004' Method 'SaveAs' of object '_Workbook' failed

    Within an excel workbook I have created a routine that automatically logs the user and date when the workbook is initially opened. The Sub Workbook_Open() calls the routine. For most users it has worked effectively for sometime. However, myself and a few users are now getting the Run-time error...
  5. V

    Save as with calculated filename - VBA

    Hi everyone, I've found a few different threads on the elements of this but I haven't been able to cobble them together, hoping you may be able to help. I'm looking to run a command which will open the save as dialogue on screen Defaultly fill the file name with 'INV_TRC_[cel c1]_[current...
  6. J

    SaveAs method and file format

    I'm trying to use Macro templates to create new workbooks, and as a part of that i want to save the template under a new name without the macros enabled. Here's what I'm doing with it: strFileName = Application.GetSaveAsFilename(filefilter:="Excel Files (*.xls), *.xls") If...
  7. J

    VBA Saveas using a filepath as specified by the user

    Good afternoon. I have been going round in circles trying to find the VBA code I need to perform a certain function, however, I have been unable to find it, so I am hoping all you experts will be able to assist me. I have created a general ledger journal and I want to assign VBA to a button...
  8. C

    Run-time error '1004' - SaveAs VBA

    Hello there! I am hoping someone could help me! I am trying to save a worksheet as a text file which i know is definitely possible and has been achieved by many other people but for some reason it is not working for me. Could someone take a look at my code and let me know where i have gone...
  9. G

    Macros! How to save file in location in cell and name file as cell!! Help

    Hello, I am far from an expert in excel and I desperately need help with Macros. I have a date in cell B4 and a name in Cell C1. I have set up folders in my location path with all the dates that I want to use. How do I use a Macro to save the file like below? "W:\\Programme\Department...
  10. M

    VBA Save PPT as PDF through Excel

    I have a macro that writes specific charts and ranges to a powerpoint shell. I would like to then have the macro save the powerpoint as a pdf with the file name specified in the excel file and close it. I have pasted my existing macro below. Can you please help?? Private Sub...
  11. W

    SaveAs Method with Filename Derived From cell reference

    I am trying to use a cell reference to have excel automatically Save a worksheet using a cell reference as the workbook name. When I step through the code and use the immediate window I get the correct name for the file (fname in this case) but as soon as Excel tries to save the file, I get an...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top