lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I want to save as a workbook so I wrote the code below. It works fine, it gives me the window below which is save as window
but when I click No (so I can pick macro enable file), I get this error message
I know I am not following the syntax of Save as, but it used to work just fine. Any idea would be appreciated very much.
I want to save as a workbook so I wrote the code below. It works fine, it gives me the window below which is save as window
but when I click No (so I can pick macro enable file), I get this error message
I know I am not following the syntax of Save as, but it used to work just fine. Any idea would be appreciated very much.
Code:
Sub myworkbook()
'save
Workbooks(1).Save
'save as
Workbooks(1).SaveAs ("hello.xlsm")
End Sub