ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Invoking Excel via Getobject(From Access) to invoke Excel Macro (https://www.excelbanter.com/excel-programming/292856-invoking-excel-via-getobject-access-invoke-excel-macro.html)

Acie[_2_]

Invoking Excel via Getobject(From Access) to invoke Excel Macro
 
OK, it was hard to explain it in the subject line.

I have a button on an Access Application, that I want to Open up Excel, and invoke an excel Form with buttons. Each button runs a Macro. Simple as that.

In Excel I have a Auto_Open() function that loads a simple form that displays a few buttons (1 per Macro). The problem that I have is that the Excel form opens up, without opening Excel Workbook. So when the macro is finished, the form closes and i'm back in the Access Application, without ever opeing up the Excel Workbook !

Anyone know how I can ensure that the Excel Workbook opens before the form i displayed?

FYI - If I remove the Load form in the Auto_Open(), then the Workbook is opened and displayed, but the form is not invoked obviously....

Any help would be greatly appreciated !

Also, Is there a way to supress the form that Excel shows indicating that there are Macros...

Thanks so much,
Acie

KJTFS[_107_]

Invoking Excel via Getobject(From Access) to invoke Excel Macro
 
Not sure if this will work but worth a try. Make all the code in th
auto open a sub in a module, then on the auto open have an ontime even
fire for 1-2 seconds after open and run the code that is now in th
sub. Might delay it long enought to show the workbook. Just
thought.

Keith
www.kjtfs.co

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 10:05 AM.

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