ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select toolbar button from macro (https://www.excelbanter.com/excel-programming/359299-select-toolbar-button-macro.html)

jasminesy

select toolbar button from macro
 
Is there anyway to select a tool bar button from within a macro?
and if so, once you complete the command you are selecting, will it return
to the original macro?

Ron de Bruin

select toolbar button from macro
 
Maybe you can use execute
This will open printpreview

MsgBox "Hi"
Application.CommandBars("Standard").FindControl(ID :=109).Execute
MsgBox "Hi again"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"jasminesy" wrote in message ...
Is there anyway to select a tool bar button from within a macro?
and if so, once you complete the command you are selecting, will it return
to the original macro?





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

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