Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think you must have tried already, but forgot to set Excel to visible.
Once you set it to visible all remaining code is same as in excel macros. You can use below code. Sub olExcelOpen() Dim exApp As Excel.Application Dim myBook As Excel.Workbook Set exApp = CreateObject("Excel.Application") exApp.Visible = True Set myBook = exApp.Workbooks.Open(FileName:="Path to the file", ReadOnly:=True) myBook.RunAutoMacros xlAutoOpen End Sub Sharad "Steve Price" wrote in message ... Didn't know whether to post this here or under Access. Basically, how do you open an Excel worksheet from Access in code? Also, the Excel worksheet uses Macro's and is read only/protected. Is it possible for the warnings to be surpressed? i.e. Instead of the user being asked whether to allow macros, these are automatically allowed. And instead of accessing to enter password to modify workbook, 'read only' is automatically chosen. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening an ACCESS db from the VBE in EXCEL | Excel Discussion (Misc queries) | |||
Opening an ACCESS db from the VBE in EXCEL | Excel Worksheet Functions | |||
Opening Access From Excel | Excel Discussion (Misc queries) | |||
Opening Access from Excel | Excel Programming | |||
Opening Excel via Access | Excel Programming |