I made a worksheet with some buttons to save, save as and print quickly, but when a I Save As is saving on the Google Drive folder because is where the current file is, but i want to save on desktop and I can't find a way to make this change directory without break the name of the file. I make the file auto rename to a value of two cells (B10 and B15) when Save As, but when i make the directory change with some ways I found on the internet, doesn't work. I cant make the name and the directory right without a error.
My current code:
Sub SaveAs()
On Error GoTo ErrorSaveAs
Dim ClientName
ClientName = Range("B10").Value & " - " & Range("B15").Value
ActiveWorkbook.SaveAs FileName:="ClientName", FileFormat:=xlOpenXMLWorkbookMacroEnabled
MsgBox "O arquivo foi salvo no seu Desktop.", vbVertical, "Sucesso! - Garage Audax" 'Success message after saving it
Exit Sub
ErrorSaveAs: MsgBox "Ocorreu um erro. Revise as informações e tente novamente.", vbVertical, "Ops! - Garage Audax" 'Error message in case of any error
End Sub