save as

  1. F

    How to insert code into a workbook from another workbook

    Hi All, not sure if this is even possible but I'm trying to save a file from another workbook and then ensure that nobody can update any links in it, etc. upon opening, and so I'd need to insert the below two lines of code under 'Workbook_Open' but I'm unsure how to this, so I'd greatly...
  2. 0

    Open Save as dialog and save it in One drive folder with predefined filename from cells

    Hi! I have a problem with Save As dialog. I wrote a code that saves excel file with predefined name and path on Desktop, which works fine. When I change Path in code to One drive folder, Save As opens in that path but, name is not defined. Dim Path As String Dim filename As String Path =...
  3. T

    Save active worksheet as new workbook in PDF format

    Hi All, The code below returns an error -Run-time error '1004': Document not saved. anyone know why? (Error on line .ExportAsFixedFormat...) Private Sub CommandButton1_Click() Range("B10").Activate If IsError(ActiveCell) Then UserForm1.Hide UserForm3.Show vbModeless Else PdfFile =...
  4. D

    Classification pop up issue when saving file

    Hello all, I would like to get some help in how to automatically assign the classification as internal document. At my company we use some classification tool in excel called Secure Islands Classification, and whenever create new file it pop ups asking to set the classification, usually...
  5. M

    Force users to save as .xlsm or pdf only

    Hello everyone, This thread is related and inspired on an old one: Force users to save as .xlsm or xltm only. In any case, I tried to replicate the code for XLSM and PDF format only. No luck. Although the two options are available, the PDF one didn't produce any good file. I would like to...
  6. T

    Save Multiple Active Workbooks

    Hello, I have the following code: Sub VisibleSheets(Optional ByVal Control As IRibbonControl) On Error Resume Next Dim ws As Worksheet Dim wbNew As Workbook Dim WSHShell As Object Dim DesktopPath As String Dim VendorName As String Dim StoreName As String VendorName = Range("I2") StoreName...
  7. K

    VBA Save Copy to OneDrive -- Multiple Users

    Hello, A project I'm working on has a button that is supposed to create a static, macro free copy of the workbook and save it to the folder which is located on OneDrive. This button will be used by multiple users, not just me. I have this coded and it works perfectly whenever I test it, but...
  8. L

    .SaveAs doesn't initate 'Workbook_BeforeClose' ?

    Hi all, I am working on a macro that makes users click "Enable Content" mandatorily to access the workbook, works like a charm, except I have a macro which does a .SaveAs under a different name, and it automatically closes my original file, but doesn't initiate the "Workbook_BeforeClose" code I...
  9. H

    Disable Save and Save As

    I want to disable both Save and Save As - I have VBA that saves the document specifically for the user and I don't want them to try and save it as their own file. I have this: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI = True Then...
  10. A

    VBA Copy Worksheet Then Save As

    Hi All, I'm currently trying to copy certain worksheet in my workbook and then save it as new excel file in download folder. Sub RectangleRoundedCorners1_Click() Dim FName As String Dim FPath As String FPath = "C:" FName = "ResultsLessThan" & Format(Date...
  11. S

    Have MsgBox show other button than Yes No Cancel

    So currently my code has vbQuestion & vbYesNoCancel. I am trying to figure out if I can replace Yes No Cancel with my own options. Preferably (not necessarily) without editing code too much. If Dir(FPath & "\" & FName & FExt) <> "" Then wAns = MsgBox("The file already exists. Do You...
  12. U

    Saving PDF works great, I just want to drop the Excel extension.

    My file is saving the entire name when it converts to a PDF. I am simply trying to get the .xlsb part to drop off. Can anyone help me understand how to code the removal of the .xlsb from the Filename or Populate the save as name as one I choose? I want to use this base code. Sub...
  13. E

    save as, closes master sheet then reopens the new saved worksheet

    I have the Following button code that saves my workbook at a desired location (Save As) with a desired name without including the pages "Main" and template". Right after I save the copy, I have another button that when clicked, it closes my "Master" workbook without any changes but keeps excel...
  14. K

    Open-Save As File Loop

    I am looking to create a loop to execute on a specific set of files inside a folder that contains 30+ files. Dim wb As Workbook strFileName = ThisWorkbook.FullName Workbooks.Open Filename:= Folder & "File Name 1.xlsm" Set wb = Application.ActiveWorkbook If Not...
  15. S

    Same code works differently in a different folder ? (no fixed pathing in code)

    So my code works differently in a the same file, but in a different file path Sub SaveAsExample() Dim FName As String Dim FPath As String On Error GoTo Handler: FPath = Sheets("Setup").Range("A1").Text FName = Sheets("Setup").Range("G1").Text...
  16. S

    How to Save as based on values in cells if the name already exists

    So surprisingly I didn't find such a simple addition to the save as macro that already exists. So I created it myself. There is already a macro that does saving as based on value in cell, but when this file already exists it pops up an error if you don't replace the file My objective was to...
  17. D

    Automating the Creation of Reports

    Hello all, I am looking to make 1000+ reports based on a template. I have other sheets referencing the target city to update the data they report on. I have a macro that saves the current workbook following the naming convention "Target #". In this case "Austin 1". I will then change the...
  18. A

    Save As Button

    I am trying to write some VBA so create a save as button that saves the document into the correct location and creates the correct file name... I am a bit of a VBA noob, I can do basics but this has me stumped!:confused::confused: Please see the code below that I have tried to butcher from...
  19. T

    Create Folder & Save As VBA

    Hi All, I have the following macro which works fine, however I would like to expand on it if possible. I would like the macro to create a file with the date if possible, where the file is then saved. Potential issue is that I may be running the macro multiple times in a day so I imagine it...
  20. T

    SaveAs VBA Removing Special Characters

    Hello, I have the following code which names a sheet after a specified cell and then copies into a new workbook. The next stage attempts to save the workbook after another cell value however this is where I became stuck. Cell D2 can contain special characters so the save as isn't working...

Some videos you may like

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top