Thanks a lot.
Actually, I have already defined a certain code, which runs well and is posted below.
The first procedure opens the second, which calls the Excel application (and at the same time checks, if Excel was already running and makes a related entry in a database to either close Excel or keep).
I would like to know, if/how the password can be included in the GetObject or CreateObject statements?
Private Sub cmd01_Click()
'Purpose: Call for Excel opening program from a commad button
'Call Statusbar text change
Call bss_StatusBarSet("Initializing EXCEL ...."
'Calls the excel opening procedure below
Call bss_ProgOpen(SelProgComp:="C:\My Documents\" _& "xxxexcelxxx.xls", SelName:="xxxexcelxxx.xls"
Call bss_StatusBarClear
End Sub
Sub bss_ProgOpen(SelProgComp As String, SelName As String)
' Purpose: Open Excel program
Const cstrProc As String = "bss_ProgOpen"
Dim DB1 As Database
Dim RS1 As Recordset
On Error GoTo bss_ProgOpen_Click_err
Dim objxl As Object
Set DB1 = CurrentDb
Set RS1 = DB1.OpenRecordset("xxxAccessxxx", dbOpenDynaset)
' Update database if or if not Excel is running
RS1.MoveFirst
RS1.Edit
Call bss_StatusBarSet("Starting DUV_Formulations.xls ...."
''''''HOW CAN I INCLUDE PASSWORD HERE?
'bss_fIsAppRunning is a boolean function which checks, if _ Excel is running or not. If so then GETOBJECT else _ CREATEOBJECT with entry in database
If bss_fIsAppRunning("Excel"

Then
Set objxl = GetObject(SelProgComp, "Excel.Sheet"

RS1!ExcelRun = "True"
Else
Set objxl = CreateObject("Excel.Application"

Set objxl = GetObject(SelProgComp, "Excel.Sheet"

RS1!ExcelRun = "False"
End If
RS1.Update
RS1.Close
Set RS1 = Nothing
Set DB1 = Nothing
'Now handing over to EXCEL window/application
objxl.Application.UserControl = True
objxl.Application.Visible = True
objxl.Application.Windows(SelName).Visible = True
'Special Excel procedure in the excel program
objxl.Application.Run "ocp_GetStart"
Set objxl = Nothing
bss_ProgOpen_Exit:
Exit Sub
' Some special error handling - not critical
bss_ProgOpen_Click_err:
'Err.Number [287] indicates rejection of Ecxel due to macros
If Err.Number = 287 Then Resume bss_ProgOpen_Exit
Call bss_ErrMsgStd(mcstrMod & "." & cstrProc, Err.Number, Err.Description, True)
Resume bss_ProgOpen_Exit
End Sub
Thanks, GeorgP