I want to save my file in a particular SharePoint folder when I press a button.

Within the same Excel spreadsheet I have data validation cells that should not be blank. If they are blank the macro should give me an error message and tell me that certain cells are blank and needs to be filled. If they are not blank, then save the file in the SharePoint folder.

My macro is as follows:

```
Private Sub CommandButton1_Click()
Dim Path As String
Dim FileName1 As String

Path = "https://xxx.sharepoint.com/sites/xxxx/xxxxxxxxxxxxx/"
FileName1 = Range("$B$2").Text
ActiveWorkbook.SaveAs Filename:=Path & FileName1 & ".xlsx", _
                          FileFormat:=xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close

End Sub

```

The cells are AD9:AM9 and AD10:AM10