AutoExec - Enable Macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am an Access Developer using automation to get Access data to Excel

After automation, any cell Borders get zapped. I can code to reset those Border
when entering Excel

My questions -

1 - What is the Macro name to AutoExec (in Lotus 1-2-3 years ago it's \0")

2 - How do I program to stop the "Disable Macros" & 'Enable Macros" opening MsgBox

& 3 - Can I run the "AutoExec" from within Access as"DoCmd.RunMacro...."

TIA - Bo

1 - W
 
Hi Bob,
1 Auto_Open()
2 You can't. You need to look into digital signatures. There is a "self cert" tool that come with office.
3 DoCmd is Access. You can use Application.run. There is an example here. http://www.google.com/groups?hl=en&...8&oe=UTF-8&as_ugroup=*excel*&lr=&num=20&hl=en

Or xlobj.application.run


--
John
johnf 202 at hotmail dot com


| I am an Access Developer using automation to get Access data to Excel.
|
| After automation, any cell Borders get zapped. I can code to reset those Borders
| when entering Excel.
|
| My questions --
|
| 1 - What is the Macro name to AutoExec (in Lotus 1-2-3 years ago it's \0")?
|
| 2 - How do I program to stop the "Disable Macros" & 'Enable Macros" opening MsgBox?
|
| & 3 - Can I run the "AutoExec" from within Access as"DoCmd.RunMacro...."?
|
| TIA - Bob
|
| 1 - W
 
Public Sub Auto_Open()

End Sub

or in the ThisWorkbook Module, use the Open event

Private Sub Workbook_Open()

End Sub

If opening a workbook manually,
In Excel 2000 or later, you can certify your project and if the user (also
having xl2000 or later) accepts you as a trusted source, then the next time
they open the file there will be no disable - enable macro prompt.

oxlApp.Run "Book1.xls!Auto_Open"

the open event should run when the workbook is opened, even when opened with
code. Auto_Open doesn't run when the workbook is opened with code.
 
Back
Top