Windows 10: VBS Script to Open Up Excel every Morning and Run Macro called "Save"

Discus and support VBS Script to Open Up Excel every Morning and Run Macro called "Save" in Windows 10 Customization to solve the problem; I have a file that I have to run every morning. It is a giant file that uses PowerQuery to pull data and refresh chart. Is this a good way to open up... Discussion in 'Windows 10 Customization' started by WieH, Mar 16, 2022.

  1. WieH Win User

    VBS Script to Open Up Excel every Morning and Run Macro called "Save"


    I have a file that I have to run every morning. It is a giant file that uses PowerQuery to pull data and refresh chart. Is this a good way to open up the file every morning refresh it and call the macro called Save?Can Anyone walk me through this to see if I am on the right track?'Input Excel File's Full Path ExcelFilePath = "J:\\Daily Visit Reports Combined.xlsm" 'Input Module/Macro name within the Excel File MacroPath = "Module1.Save" 'Create an instance of Excel Set ExcelApp = CreateObject"Excel.Application" 'Do you want this Excel instance to be visible? ExcelApp.Visible = T

    :)
     

  2. Running a VB Script File Using Windows 10 Task Scheduler

    Please post your current version of the script.

    Note also that I'll be off the air for a whole week, starting this coming Sunday evening. With your response cycle of one reply per day, you are unlikely to solve your problem anytime soon. This is aggravated by you consistenly posting insufficient information
    (e.g. repeatedly not posting your script, not posting numbers of problem lines, taking numerous attempts to post the exported xml file etc. etc.). You need to remember that respondents cannot see your screen.

    Lastly - you are trying to use the Task Scheduler to launch a script to open an Excel file to launch a macro. This is an extremely ambitious task. It is also not a good way to do things. A script can do everything that a macro can, and more, but more simply.
    Forget about the macro. Here are the steps you should take:

    • Get my script going in the foreground.
    • Get it going while scheduled.
    • Write a script that opens an Excel file.
    • Run it in the foreground.
    • Run it in the background.
    • Expand it to manipulate the spreadsheet.
    • Run it in the foreground
    • Run it in the background.
     
    Frederik Long, Mar 16, 2022
    #2
  3. Running a VB Script File Using Windows 10 Task Scheduler

    Frederik,

    Your script file ran manually and so does the one that I wrote to run my Excel program/macros.

    The Task Scheduler has never worked with either of these two vbs programs. Both ran fine manually but NOT using Task Scheduler.
     
    John JVrana, Mar 16, 2022
    #3
  4. VBS Script to Open Up Excel every Morning and Run Macro called "Save"

    Excel 2013 Export as PDF

    If you can get the macro to invoke a console script then you could do this when running the macro:

    1. Invoke the script to set the preferred printer.
    2. Print the data.
    3. Invoke the script to restore the original printer.
    Implementing such a scheme requires skills at adjusting a .vbs script to reflect your existing printers. You could start by getting your macro to invoke this sample script which you need to save as Hello.vbs:

    msgbox "Hello world!", 48
     
    Frederik Long, Mar 16, 2022
    #4
Thema:

VBS Script to Open Up Excel every Morning and Run Macro called "Save"

Loading...
  1. VBS Script to Open Up Excel every Morning and Run Macro called "Save" - Similar Threads - VBS Script Open

  2. VBS script malware

    in Windows 10 Gaming
    VBS script malware: I have accidentally downloaded malware onto my computer. It is trying to run RuneGoTOMjbvdo.vbs which i deleted. I get a warning that Windows Script host cannot find the file. I have run Malwarebytes, and frst64. I have also added and enable key to the registry to disable...
  3. VBS script opening error

    in Windows 10 Gaming
    VBS script opening error: Hi guys.A .vbs script in the startup/programs folder that should open on every startup displays the following error and the script fails to run every time.The error message is -' Creates a SR point during the first startup of the day ' Option Explicit Dim SRP, CSRP, objWMI,...
  4. VBS script opening error

    in Windows 10 Software and Apps
    VBS script opening error: Hi guys.A .vbs script in the startup/programs folder that should open on every startup displays the following error and the script fails to run every time.The error message is -' Creates a SR point during the first startup of the day ' Option Explicit Dim SRP, CSRP, objWMI,...
  5. VBS script opening error

    in Windows 10 BSOD Crashes and Debugging
    VBS script opening error: Hi guys.A .vbs script in the startup/programs folder that should open on every startup displays the following error and the script fails to run every time.The error message is -' Creates a SR point during the first startup of the day ' Option Explicit Dim SRP, CSRP, objWMI,...
  6. VBS Script to Open Up Excel every Morning and Run Macro called "Save"

    in Windows 10 Gaming
    VBS Script to Open Up Excel every Morning and Run Macro called "Save": I have a file that I have to run every morning. It is a giant file that uses PowerQuery to pull data and refresh chart. Is this a good way to open up the file every morning refresh it and call the macro called Save?Can Anyone walk me through this to see if I am on the right...
  7. VBS Script to Open Up Excel every Morning and Run Macro called "Save"

    in Windows 10 Software and Apps
    VBS Script to Open Up Excel every Morning and Run Macro called "Save": I have a file that I have to run every morning. It is a giant file that uses PowerQuery to pull data and refresh chart. Is this a good way to open up the file every morning refresh it and call the macro called Save?Can Anyone walk me through this to see if I am on the right...
  8. Excel Macro File Saving Problem

    in Windows 10 Gaming
    Excel Macro File Saving Problem: Hello Friends, Here I am new so, please help me. I received a message/error "There isn't enough memory to complete this action" when I save my MACRO File. I try all things from YOUTUBE but not helpful....
  9. Excel Macro File Saving Problem

    in Windows 10 Software and Apps
    Excel Macro File Saving Problem: Hello Friends, Here I am new so, please help me. I received a message/error "There isn't enough memory to complete this action" when I save my MACRO File. I try all things from YOUTUBE but not helpful....
  10. Excel Macro File Saving Problem

    in Windows 10 Network and Sharing
    Excel Macro File Saving Problem: Hello Friends, Here I am new so, please help me. I received a message/error "There isn't enough memory to complete this action" when I save my MACRO File. I try all things from YOUTUBE but not helpful....