lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
When I run the code below, I get this message
But that defeat the purpose. I mean, if I entered file name as Hello.xlsm, sill I get that message.
How can I improve that code?
By the way, if I save the file as "*.xlsm" before running that code and then when I run the code below, I wont get that massage. But if the file was a new (for example its name is Book1) then running the code below will get me that message. Thanks a lot.
When I run the code below, I get this message
But that defeat the purpose. I mean, if I entered file name as Hello.xlsm, sill I get that message.
How can I improve that code?
By the way, if I save the file as "*.xlsm" before running that code and then when I run the code below, I wont get that massage. But if the file was a new (for example its name is Book1) then running the code below will get me that message. Thanks a lot.
Code:
Sub mysaveas()
Dim xfile As String
xfile = InputBox("enter file name with extension")
Workbooks(1).SaveAs Filename:=xfile
End Sub