This is the same formular I saw work however it continualy gives me run time error.
Can anyone help??
Private Sub CommandButton1_Click()
Dim path As String
Dim filename1 As String
path = "C:\driver demo"
filename1 = Range("D2").Text
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename:=path & filename1 & ".xlsx", FileFormat:=xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub
Can anyone help??
Private Sub CommandButton1_Click()
Dim path As String
Dim filename1 As String
path = "C:\driver demo"
filename1 = Range("D2").Text
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename:=path & filename1 & ".xlsx", FileFormat:=xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub