It is simple enough, provided you ensure that you error trap Excel not be ing open and the file not present e.g.
Sub Example()
'Graham Mayor - http://www.gmayor.com - Last updated - 24 Oct 2017
Dim xlApp As Object
Dim xlWB As Object
On Error Resume Next
Set xlApp = GetObject(, "Excel.Application")
If Err <> 0 Then
MsgBox "Excel is not running"
End If
On Error GoTo 0
Set xlWB = xlApp.Workbooks("Test.xlsm")
If xlWB Is Nothing Then
MsgBox "Test.xlsm is not open"
GoTo lbl_Exit
End If
With xlWB.Sheets(1)
.Range("A1") = "y"
End With
lbl_Exit:
Set xlApp = Nothing
Set xlWB = Nothing
Exit Sub
End Sub