VBA: CopyWorkbookWithoutFormulas
Created by Damien Zwillinger, Modified on Tue, 22 Oct at 11:04 AM by Harry Lewis
Applies to:
- Velixo Classic
Important: Visual Basic for Applications macros are not supported by Excel Online.
Purpose
Copies the active workbook without Velixo's formulas to a specific location on the disk.
See Introduction to Velixo's VBA functions for general usage information.
Syntax
objVelixo.CopyWorkbookWithoutFormulas TargetPath
objVelixo - a variable that represents an instance of the Velixo VBA functions class.
Parameters
Name | Description |
TargetPath | Required.
A String value that provides the full destination file path, including extension.
If the file already exists it will be overwritten.
Supported extensions: ".xlsx", ".xls", ".xlsm", ".xlsb". |
Remarks
Newly created workbook becomes the active workbook.
If Application.DisplayAlerts
is set to False
, any message boxes will be suppressed. This is especially useful for a fully unattended automation. Once completed, set DisplayAlerts
back to True
Pro tip: Macros can be removed from an Excel Macro-Enabled Workbook file (*.xlsm) by providing a TargetPath for a standard Excel Workbook file (*.xlsx).
Example
Dim velixoObj As Velixo_Reports.VBA
Set velixoObj = CreateObject("Velixo.Reports.Vba")
Application.DisplayAlerts = False
velixoObj.CopyWorkbookWithoutFormulas "C:\The\Desired\Path\FileName.xlsx"
Application.ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article