Hi, I have a simple code to open Excel Workbook:
Private Sub cmdDataClean_Click()
Dim dbs As Database
Set dbs = CurrentDb
Dim xlExcel As Object
Set xlExcel = CreateObject("Excel.Application")
Dim fnstr As String
fnstr = "C:\" & Me.txtFileName
xlExcel.Workbooks.Open (fnstr)
End Sub
The code runs without any issues, but the Excel file is not visible. If I try to open it directly from C drive, I get a notification that the file is already open. How can I view it?
Private Sub cmdDataClean_Click()
Dim dbs As Database
Set dbs = CurrentDb
Dim xlExcel As Object
Set xlExcel = CreateObject("Excel.Application")
Dim fnstr As String
fnstr = "C:\" & Me.txtFileName
xlExcel.Workbooks.Open (fnstr)
End Sub
The code runs without any issues, but the Excel file is not visible. If I try to open it directly from C drive, I get a notification that the file is already open. How can I view it?