ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoExec - Enable Macros (https://www.excelbanter.com/excel-programming/288243-autoexec-enable-macros.html)

Bob Barnes[_3_]

AutoExec - Enable Macros
 
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

jaf

AutoExec - Enable Macros
 
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&l...20%26hl%3D en

Or xlobj.application.run


--
John
johnf 202 at hotmail dot com


"Bob Barnes" wrote in message ...
| 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

Tom Ogilvy

AutoExec - Enable Macros
 
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.

--
Regards,
Tom Ogilvy


Bob Barnes wrote in message
...
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




Bob Barnes[_4_]

AutoExec - Enable Macros
 
John & Tom - I thank both of you.

Bob


All times are GMT +1. The time now is 11:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com