I am trying to check if a folder exits, and if not, create it (folder name is WOD). I am then trying to save the file as the contents of a cell which is found on a different sheet from where the macro is run, the sheet being Multiple and the cell being G9. The code falls over at the Range("Multiple!G9") part so I obviously have the syntax wrong but I am not sure what it should be. Help please!
Sub Saveworksheet()
If Len(Dir("c:\WOD", vbDirectory)) = 0 Then
MkDir "c:\WOD"
End If
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="C:\WOD\" & Range("Multiple!G9"), _
FileFormat:=(.xlsm), _
CreateBackup:=False
Application.DisplayAlerts = True
ActiveWorkbook.Close SaveChanges:=False
End Sub
Bookmarks