diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2015-01-04 15:25:25 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2015-01-04 15:30:17 +0100 |
commit | c36353d844f05e1de6a0c31cb6bf102887dc114a (patch) | |
tree | c4dc1eef3bcd1048c019659093a1155f9de2318c /wizards/source/access2base/Collect.xba | |
parent | 4eed16d83cad3446e250c23f9e9ca48a1d9a6d9c (diff) |
Access2Base - New CommandBarControl class
Main functionalities:
- show/hide toolbar elements
- modify tooltip
- get/set internal command
- execute internal command
Change-Id: Ice830009f9eabc199727c7d4b54ebf524b026d40
Diffstat (limited to 'wizards/source/access2base/Collect.xba')
-rw-r--r-- | wizards/source/access2base/Collect.xba | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/wizards/source/access2base/Collect.xba b/wizards/source/access2base/Collect.xba index 9039584b3300..cafda777c67e 100644 --- a/wizards/source/access2base/Collect.xba +++ b/wizards/source/access2base/Collect.xba @@ -62,7 +62,12 @@ Property Get Item(ByVal Optional pvItem As Variant) As Variant Const cstThisSub = "Collection.getItem" Utils._SetCalledSub(cstThisSub) If IsMissing(pvItem) Then Goto Exit_Function ' To allow object watching in Basic IDE, do not generate error - If Not Utils._CheckArgument(pvItem, 1, Utils._AddNumeric(vbString)) Then Goto Exit_Function + Select Case _CollType + Case COLLCOMMANDBARCONTROLS ' Have no name + If Not Utils._CheckArgument(pvItem, 1, Utils._AddNumeric()) Then Goto Exit_Function + Case Else + If Not Utils._CheckArgument(pvItem, 1, Utils._AddNumeric(vbString)) Then Goto Exit_Function + End Select Dim vNames() As Variant, oProperty As Object @@ -74,6 +79,8 @@ Dim vNames() As Variant, oProperty As Object Set Item = Application.AllForms(pvItem) Case COLLCOMMANDBARS Set Item = Application.CommandBars(pvItem) + Case COLLCOMMANDBARCONTROLS + Set Item = Application.CommandBars(_ParentName).CommandBarControls(pvItem) Case COLLCONTROLS Select Case _ParentType Case OBJCONTROL, OBJSUBFORM |