I've read a lot of the different threads on this forum concerning adding a new workbook but I cannot seem to get the macro to work the way it needs to... the code below doesn't work, it's not the proper syntax but it gives you an idea of what I'm trying to do:
1. add new Workbook
2. save new Workbook
3. add input box so the user can designate the filename
4. designate the proper filepath
5. save file to filepath
It seems like a simple task, if anyone could offer their guidance I'd be appreciative. Thanks!
1. add new Workbook
2. save new Workbook
3. add input box so the user can designate the filename
4. designate the proper filepath
5. save file to filepath
Code:
[COLOR=#323232][FONT=Arial]Sub Macro2()[/FONT][/COLOR]
[COLOR=#323232][FONT=Arial]Dim Wk As Workbook
Dim fname As String[/FONT][/COLOR]
[COLOR=#323232][FONT=Arial]Set Wk = Workbooks.Add
Application.DisplayAlerts = False
fname = InputBox(“What is the filename?”)
Wk.SaveAs Filename:=”C:\” & fname & “.xlsx”
Application.DisplayAlerts = True[/FONT][/COLOR]
[COLOR=#323232][FONT=Arial]End Sub[/FONT][/COLOR]
It seems like a simple task, if anyone could offer their guidance I'd be appreciative. Thanks!