I have tried to create a new file and save the new file, however when i run the code, Error 9 pops up.
Sub openwba()
Dim wb As Workbook
Dim NewWB As String
NewWB = "C:\Users\Chengwu\Desktop\Train10_June01.xlsx"
Set wb = Workbooks.Add
wb.SaveAs Workbooks(NewWB)
End Sub
You could try:
Note: