BuiltInControl calling StandardAction

Add-in Express™ Support Service
That's what is more important than anything else

BuiltInControl calling StandardAction
Calling StandardAction at runtime 
Patrick Esche




Posts: 8
Joined: 2005-03-01
Hello,

I want to overwrite both the open- and savefunctionality in Excel. Depending on the state of one of my own buttons I want to either call my own open-/ savedialogs or the standarddialogs. Now I have added three adxBuiltInControls to my module (Open, Save, SaveAs) and I have set DisableStandardAction to true. Setting it back to false at runtime has no effect unfortunately. Is there any way to call the standardfunctions again or at least open the standarddialogs?

Thx in advance,

Patrick Esche
Posted 01 Mar, 2005 08:55:40 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Patrick,

Is there any way to call the standard functions again or at least open the standard dialogs?


Sure, there is such a way. See the Open method of the Workbooks interface and the Save and SaveAs methods of the _Workbook interface. On the other hand you can set DisableStandardAction to false and after executing your code the standard functions will be executed.


Posted 01 Mar, 2005 09:17:10 Top
Patrick Esche




Posts: 8
Joined: 2005-03-01
Hi Dmitry,

Unfortunately, this is not what I mean. Setting DisableStandardAction to false means the standard functions will always be executed, but that is exactly what I don't want. I want to decide at runtime which function should be executed (standard or mine).

And I know the methods Open, Save and SaveAs of the _Workbook interface, but calling them doesn't open the standarddialogs...

I could of course use the standarddialogs from windows, but I would really prefer not to.
Posted 02 Mar, 2005 02:39:28 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Patrick,

Ok, now I understand what you need. In this case you can try to call the standard Excel dialogs. For example ExcelApp.Dialogs.Item[xlDialogOpen].Show().

See also MS help:
http://msdn.microsoft.com/library/en-us/vbaxl11/html/xlobjDialog1_HV05200576.asp
Posted 02 Mar, 2005 07:18:46 Top