Hi,
I'm opening an excel document from access using a form and want the external data toolbar to be displayed in Excel when it opens. This is my code:
But it doesn't seem to be working (i.e. the external data toolbar is not being displayed) can anybody suggest where i'm going wrong?
p.s. operating system is windows NT and office is version 97
I'm opening an excel document from access using a form and want the external data toolbar to be displayed in Excel when it opens. This is my code:
Code:
Private Sub Command14_Click()
On Error GoTo Err_Command14_Click
Dim excApp As Excel.Application
Dim excDoc As Excel.Workbook
Set excApp = CreateObject("Excel.Application")
excApp.Workbooks.Open FileName:="F:\Caseholders\Caseholder MI\Estate Static By Caseholder.xls"
excApp.Visible = True
excApp.WindowState = xlMaximized
excApp.CommandBars("External Data").Visible = True
Set excDoc = Nothing
Set excApp = Nothing
Exit_Command14_Click:
Exit Sub
Err_Command14_Click:
MsgBox Err.Description
Resume Exit_Command14_Click
End Sub
But it doesn't seem to be working (i.e. the external data toolbar is not being displayed) can anybody suggest where i'm going wrong?
p.s. operating system is windows NT and office is version 97