Access2Base - Return value of Execute method in CommandBarControl

Method always returned False. Should return True when successful.

Change-Id: I82c8a6e425409032ccf5217b940ec81b277a6313
This commit is contained in:
Jean-Pierre Ledure
2015-07-26 13:10:18 +02:00
parent 33a21d37f3
commit faa5b96028

View File

@@ -152,24 +152,25 @@ Const cstThisSub = "CommandBarControl.Execute"
Utils._SetCalledSub(cstThisSub) Utils._SetCalledSub(cstThisSub)
Dim sExecute As String Dim sExecute As String
Execute = False
Execute = True
sExecute = _GetPropertyValue(_Element, "CommandURL", "") sExecute = _GetPropertyValue(_Element, "CommandURL", "")
Select Case True Select Case True
Case sExecute = "" Case sExecute = "" : Execute = False
Case _IsLeft(sExecute, ".uno:") Case _IsLeft(sExecute, ".uno:")
Execute = DoCmd.RunCommand(sExecute) Execute = DoCmd.RunCommand(sExecute)
Case _IsLeft(sExecute, "vnd.sun.star.script:") Case _IsLeft(sExecute, "vnd.sun.star.script:")
Execute = Utils._RunScript(sExecute, Array(Nothing)) Execute = Utils._RunScript(sExecute, Array(Nothing))
Case Else Case Else
End Select End Select
Exit_Function: Exit_Function:
Utils._ResetCalledSub(cstThisSub) Utils._ResetCalledSub(cstThisSub)
Exit Function Exit Function
Error_Function: Error_Function:
TraceError(TRACEABORT, Err, cstThisSub, Erl) TraceError(TRACEABORT, Err, cstThisSub, Erl)
Reset = False Execute = False
GoTo Exit_Function GoTo Exit_Function
End Function ' Execute V1.3.0 End Function ' Execute V1.3.0