WindsorKnot
Board Regular
- Joined
- Jan 4, 2009
- Messages
- 160
Hi all,
Whenever i run my subfunction I get the following error message:
"The following Features cannot be saved in a macro-free workbooks:
VB Project
To save a file with these features, click no, and then choose a macro-enabled file type...."
As expected, when one clicks no it results in a runtime 1004 error. Is it possible not to have this warning message shown everytime? My concern is some of my coworkers who are not vba friendly may get confused and click no, causing the code to crash.
This is my current code which runs fine, minus the macro-free error
Whenever i run my subfunction I get the following error message:
"The following Features cannot be saved in a macro-free workbooks:
VB Project
To save a file with these features, click no, and then choose a macro-enabled file type...."
As expected, when one clicks no it results in a runtime 1004 error. Is it possible not to have this warning message shown everytime? My concern is some of my coworkers who are not vba friendly may get confused and click no, causing the code to crash.
This is my current code which runs fine, minus the macro-free error
Code:
Sub pastespecial()
Dim lsheets As Worksheet
For Each lsheets In Worksheets
lsheets.Activate
Cells.Select
Selection.Copy
Selection.pastespecial Paste:=xlPasteValues, Paste:=xlFormats
Next lsheets
Application.CutCopyMode = False
MyDate = Format(Date, "mm-dd-yyyy")
myfile = ThisWorkbook.Name & MyDate & "email" & ".xls"
mypath = ThisWorkbook.Path & "\"
ThisWorkbook.SaveAs myfile & Path
MsgBox "New Range-Valued Workbook has been created"
End Sub
Last edited: