saveas

  1. A

    VBA saveas causing corruption

    Hello all, I have a code opening a workbook then creating a copy under a new file name, but whenI go to open the new file, it says it is corrupted. No idea why. Any help would be greatly appreciated. Sub VEDC() Dim wrkMyWorkBook As Workbook If...
  2. R

    Creating multiple excel files from a template - renaming and saving them based on list

    Hello Guys! I am really new with VBA, i hope You can help me with this. My girlfriend got a task at her workplace, to create 400+ excel files. I think this could be easily done with VBA. I tried many codes, but unfortunately i don't have the knowlege to modify them at the moment, but i really...
  3. B

    Exporting tab to new book error message

    Hello, Please see code below - I currently use this to export a hidden tab from a master document. However, there are 2 main issues with it, as follows: 1) Is it possible to set a name that this exported book saves as, i.e. "Book1", and if so, can this be set so that next time it will be...
  4. F

    Workbook name and extension changes bizarrely after using worksheet.saveas()

    Hey everyone! I have written some VBA code in my workbook called "main.xlsm". In this workbook I have 2 data sheets called POS1 and POS2 that I want to export as TXT. I tried using the worksheet.SaveAs method (will paste the code below). However, a very strange problem occurs when I run the...
  5. B

    Method SaveAs of object '_Workbook' failed

    I'm trying to create a button that, when clicked, saves the whole file to a defined location under a name that is a concatenation of 3 cells. Here's my code so far but i'm clearly doing something wrong Private Sub CommandButton1_Click() Dim strPath As String Dim strFolderPath As String...
  6. J

    VBA sticking on Save As

    Hi Something strange has started happening with my code, maybe someone has seen it before? I have a spreadsheet that is used by multiple users, and one of the parts of the code is to save created sheets (using the wb.saveas ... code) This has never been a problem, and has been in use since last...
  7. M

    Save a macro file in a new file without the macros

    I am stuck. I need to save the file without macros and attach it to an email/ I cannot get any of your examples to work/ If you have another option, I will take it. Dim OlApp As Object Set OlApp = CreateObject("Outlook.Application") Dim NewMail As Object Set NewMail = OlApp.CreateItem(0) Dim...
  8. R

    Run-time error "1004" Method "SaveAs"

    Good day, I have the below REALLY simple code to save a sheet in a workbook as CSV for upload to a database, however I keep getting the Run-time error "1004" Method "SaveAs" when I try and execute it. I can't figure out what I have got wrong - any advise? Thanks Sub SaveCSV()...
  9. A

    VBA SaveAs RunTime Error 1004

    Hello, I keep receiving RunTime Error 1004 at the saveAs line of my code. The code is below. I have tried multiple different solutions people have posted, but it doesn't help. Private Sub CommandButton1_Click() Dim Path As String Dim Name As String Dim Loc As String Set wb = Workbooks.Add...
  10. Z

    Fastest way to put files in a network folder / saveas or filecopy?

    I want to save Excel files in both the local drive and in the network folder. Currently I am doing it with SaveAs (local) and another SaveAs (network), is it faster to do a SaveAs then FileCopy? Code below: Sub SaveAs() Dim ws As Worksheet Dim ws_console As Worksheet Dim...
  11. G

    Export Cell Range As JPEG and Save As

    Hi All, I have a sheet in which I have 2 images within a cell to the left (A4) and a product code in the next cell (C4). I have to screenshot cell A4 and save the file as the product code in C4 (another program uses this data so they have to be saved in this format). I’m currently using the...
  12. T

    VBA for Save as PDF & Save file help

    Hi Guys, I have created a VBA which saves the active sheet of the specific workbook - this works perfectly but I also want to save the whole workbook alongside the PDF with the same filename as the PDF. How can I fit this in on the same macro? Please see below code: Sub PDFActiveSheet() Dim...
  13. D

    VBA to create a folder name with the date for Monday and Friday separated by a hyphen?

    Hi Folks, I have found a great macro which allows you to check for the existence of folders in a file-path matching: Year, Month and Day (i.e., creating the folder if it doesn't exist). For instance, if the FilePath starts: C:\Temp Time Sheets\ it checks for C:\Temp Time Sheets\2019\ C:\Temp...
  14. R

    Prints Sheets and SaveAS Macro

    I want to create a macro that Prints 3 sheets from my workbook and then launches the saveAs window The 3 sheets I am looking to print are "Team 1" "Team 2" & "Team 3" Is this possible to do in one macro since there are windows that will pop up for both printing and save as?
  15. K

    VBA: save document to path from variable

    Hello all, In have a file path saved as the variable "File_Path". Now I want to save a workbook to that path. I'm using the following code: WB2.SaveAs Filename:= _ File_Path _ , FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False It is not recognising "File_Path" as...
  16. C

    VBA SaveAs Error

    Hello, I am trying to automate some data importing into a spreadsheet from another then save as a new file name. When I go through the macro it all works right up to the point it trys to save the spreadsheet. I just get the run time error 424: Object required I am sure I must be missing...
  17. E

    "Saving" Notification/Status window not closing after VBA Save

    Though currently on Office 365 I have experienced this issue in earlier versions as well. I am using the ActiveWorkbook.SaveAs command to save a new workbook. The save is successful; however the Saving status window does not close. In order to continue processing I must select Cancel...
  18. N

    VBA code to Save As in Current Folder and a Cell Dependent Name

    Hello I was wondering how to make a macro SaveAs my file into the folder that my main file is in. Currently my code saves to my documents folder. My current code: Sub SaveAs() ActiveWorkbook.Save ThisFile = Range("B4").Value & Range("B8").Value ActiveWorkbook.SaveAs Filename:=ThisFile End...
  19. F

    Make PowerPoint macro SaveAs overwrite without warning popup

    Hi, is it possible to write a code to Excel VBA that saves a PowerPoint presentation to SharePoint with a dynamic name (changes according to a specific cell value) and overwrites the existing file, if there is one? This is my code now, and it doesn't work. Application.DisplayAlerts = False...
  20. R

    VBA code with cell.Value and SaveAs works in Windows, not Mac, help

    Hi, I've got a piece of code I found online and it works awesome in Excel for Windows. It takes a long list of data and saves out separate files for each unique value in column A. However, when running it on Excel 2019 for Mac, it does not use the unique values in Column A for the file name, but...

Watch MrExcel Video

This Week's Hot Topics

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
Top