tkroper
Active Member
- Joined
- Feb 2, 2007
- Messages
- 255
Hi Friends!
I'm making my first attempt at VBA, trying to save a file using cell data to a file location. Here's what I have:
The "Path" is red and so is the "ActiveWorkbook.SaveAs" line. It says I have a syntax error. Can anyone help me correct this?
Thank you
I'm making my first attempt at VBA, trying to save a file using cell data to a file location. Here's what I have:
Code:
Private Sub CommandButton1_Click()Dim Path As String
Dim FileName1 As String
Dim FileName2 As String
Path = “H:\Audit Vendor Resources\Quality Review Checklist\Reviews\”
FileName1 = Range(“D10”)
FileName2 = Range(“D9”)
ActiveWorkbook.SaveAs Filename:=Path & FileName1 & “ ” & FileName2 & “.xls”, FileFormat:=xlNormal
End Sub
The "Path" is red and so is the "ActiveWorkbook.SaveAs" line. It says I have a syntax error. Can anyone help me correct this?
Thank you