activeworkbook.saveas

  1. C

    Occasional error with saving macro on sharepoint

    Hi everyone, Newbie question here so any help I get I'll be grateful! I tried using the following script to save a spreadsheet onto sharepoint which i've opened with vba on another spreadsheet. Path = "http://sharepoint.com/" filename1 = " Test File" dtt = Format(CStr(Now), "hhmm")...
  2. G

    Need assistance in cleaning up a macro

    Hi I have the following macro and I need to tidy up and make a few changes if poss. What it is when it opens up X/BACKUP I need it to auto create a subfolder and then ask me to name it before moving the data from the other files into it. Macro enclosed. ActiveWorkbook.SaveAs...
  3. earthworm

    Elseif macro to skip macro and execute another macro if conditions are not met

    I want to create a macro that will create new sheet and save the same if the value in particular cells are >0 I created one but its only saving one sheet at a time and not moving to second macro if the value in first cell is >0 Please assist Sub if_1()If Range("c2").Value > 0 Then...
  4. D

    Filename from a range in diff sheet

    The code below works great if I am on Sheet1, but what if Range("H3").Value is on Sheet2 and I am still on another sheet? Reason is because i want to save as CSV and that will delete Sheet2 Can't seem to get the syntax right Worksheets("Sheet1").Activate ActiveWorkbook.SaveAs...
  5. P

    VBA - Save each sheet as new workbook with sheet name

    Can anyone help me with the following code i wrote: It only saves the first sheet. Sub copysheet() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ActiveSheet.Copy wb_name = ActiveSheet.Name Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:= _...
  6. H

    VBA code for stopping the save promt box from poping up

    I am running a VBA code to convert several excel files and I am needing to get the pop up prompt to stop showing. This is the code I am working with Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:"E\bob_smith\Done.txt" FileFormat:=xlText Application.DisplayAlerts = True I...
  7. B

    Autosave messes with my VBA solution

    With AutoSave ON: I must close the active workbook after saving as .xlsx Then, copy the active workbook again, Delete the unnecessary columns and SaveAs the .cvs Otherwise, AutoSave performs the deletion and Autofit on the original copied worksheet. This code works, but seems kind of...
  8. B

    Auto Filter of range class failed

    Hello I keep getting an error that I can't figure out why, I have been racking my brain for hours. I keep getting the auto filter of range class failed and all spelling is correct and there shouldn't be any problems. Here is my code. Sub SplitCodeFilterSheet() Dim wswb As StringDim wssh As...
  9. A

    [VBA] Add 1 To Cell Then Save As

    Goal: Start with 1 file in a folder. "C:\FL\Test1.xlsx" In Cell A1 of that file is the value 1. I need to open that file. Add 1 to Cell A1 then save as a new file. "C:\FL\Test2.xlsx" I already have the VBA for the ActiveWorkbook.SaveAs to read off of the Range. I am just in need of...
  10. J

    SaveAs Runtime Error 1004 issue

    Hi Guys, I'm sometimes getting a runtime error on the "ActiveWorkbook.SaveAs" line Other times it works like a dream. I'm confused... Sub TestForDirAndSave() If MsgBox("Are you sure?", vbOKCancel, "Save?") = vbCancel Then Exit Sub Dim strDir As String strDir =...
  11. G

    MACRO needed to save workbook as xlsx and remove macros

    Hello, I am trying to build a button that will automatically convert the file from macro enabled to macro disabled version. I have tried the following but it's not really working correctly...
  12. crystalneedshelpplzthnx

    How to select workbook with partial name "Book*"

    https://www.mrexcel.com/forum/excel-questions/580779-switch-open-workbook-using-partial-name-wildcard.html I am not comprehending how to add the fuzzy criteria to my code. Any help would be greatly appreciated. Windows("Book1").Activate ActiveWorkbook.SaveAs Filename:= _ "Daily...
  13. PIsabel

    auto close

    Hello. I am trying to create a macro that every time I close the file the macro makes a copy of that file. So far I have this but it still does not work well. Someone can help me? Thank you, Isabel Sub auto_close() If ThisWorkbook.Path = "\\Servidor\servidor\ORÇAMENTOS\orç - A Fazer"...
  14. P

    VBA to name the active workbook and save it to the desktop of different users computers

    I have a spreadsheet that has a value in a cell that I'm calling WMWeek. The value will change, but is currently 201736 I'm trying to save the active spreadsheet with the following file name to the desktop of the person who is running the program: Weekly Report - 201736.xlsx . I'm using the...
  15. C

    VBA SaveAs "Run-time error 1004 method 'saveas' of object '_workbook' failed"

    I want to save an excel file. -The file’s name and folders’s names will change each time a file is saved. -I recorded a macro to save the current file, then added variables defined by InputBoxes so a user could name and save each file to the correct folder.</SPAN> I get the error message...
  16. T

    ActiveWorkbook.SaveAs with vlookup and cell.Value

    Hi im using Split an Excel File in to Many using VBA from Chandoo.org In the SaveAs part how would I change "& cell.Value &" to something like "& vlookup(cell.Value,MyNamedRange,2,0) &" Dim cell As Range Dim curPath As String curPath = ActiveWorkbook.Path & "\" For Each cell In...
  17. Wildwood

    ActiveWorkbook.SaveAs leaving whitespace in text file

    The following is a snip of the code I'm using for generating txt files from a procedure in a multisheet workbook with multiple tabs. Generally speaking the process works fine except the method I have to select the sheet to manage the ActiveWorkbook.SaveAs function. This method leaves each text...
  18. RJSIGKITS

    ActiveWorkbook.SaveAs Path error

    Hi Guys, Usually I can find answers by searching the site, but couldn't seem to find an answer to this one.. Any Ideas as to why this VB Code is resulting in the Clicked SaveAs action dumping the file into the "*******s" part of my File path rather than into "1 QUOTES" Which is where I need it...

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