Hi Filips
Try this in Access
Sub test()
Dim bar
On Error Resume Next
Set xl = GetObject(, "Excel.Application")
If xl Is Nothing Then
Set xl = GetObject("", "Excel.Application")
xl.workbooks.Open "c:\Data\test3.xls"
xl.UserControl = True
xl.Visible = True
For Each bar In xl.CommandBars
bar.Enabled = False
Next
End If
AppActivate "Microsoft Excel"
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Filips Benoit" wrote in message ...
Dear All,
How can I hide all menubars by code when opening excel from Access.
Thanks,
Filip