Artisez
Member
Hi all, having a bit of trouble. I have a workbook that I need to save based on 3 cell values and macro enabled:
>>> use code - tags <<<
I get an error on
Any help would be appreciated.
>>> use code - tags <<<
Code:
Sub SaveWorkbookWithCellValues()
Dim ws As Worksheet
Dim fileName As String
Dim path As String
Set ws = ThisWorkbook.Sheets("Vessel Schedule")
Dim value1 As String
Dim value2 As String
Dim value3 As String
value1 = ws.Range("F2").Value
value2 = ws.Range("P1").Value
value3 = ws.Range("Q1").Value
path = "C:\Art\"
fileName = value1 & " " & value2 & " " & value3 & ".xlsm"
ThisWorkbook.SaveAs fileName:=path & fileName, FileFormat:=xlOpenXMLWorkbook
End Sub
Any help would be appreciated.
Last edited by a moderator: