Amending Right-Click Options
Hi Bob
That's excellent thank you
Have used ........
Dim ctl As String
Dim strCntrl As String
Application.CommandBars("Query").Reset
For Each ctl In Application.CommandBars("Query").Controls
Debug.Print ctl.Caption
strCntrl = ctl.Caption
With Application.CommandBars("Query")
.Controls(strCntrl).Visible = False
End With
Next ctl
To get rid of them all before I add my own
Thank you very much indeed
Matt
-----Original Message-----
Matt,
Sorry, I always make that mistake. Try this version
For Each ctl In Application.CommandBars
("Query").Controls
Debug.Print ctl.Caption
Next ctl
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Matt" wrote in
message
...
Hi Bob
Thank you for this.
The query toolbar will appear when you right-click on
any
data in query you have created using Microsoft Query.
For Each ctl In Application.CommandBars("Query")
Debug.Print ctl.Caption
Next ctl
Gives me an error message "Object does not support this
property or method." Not sure what this means?
Regards
Matt
.
|