IBM / paxapi

This repository hosts the API documentation for IBM Planning Analytics for Microsoft Excel. For full product documentation, please visit the Knowledge Center:
https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/kc_gen/com.ibm.swg.ba.cognos.ipa.doc_using_planning_analytics_toc-gen2.html
Apache License 2.0
6 stars 5 forks source link

UnlinkSheet automation in PAFE, can we suppress the messages ? #31

Closed wimgielis closed 3 years ago

wimgielis commented 3 years ago

Bug Description With the UnlinkSheet method in PAFE, executed in Excel VBA, the user gets asked for confirmation in a MsgBox. While this is fine for usage of 1 time, it's fine. However, when automating report bursting, we should have a way to suppress that confirmation (other than an ugly Application.SendKeys and timer function in VBA - which is not guaranteed to work even).

For additional context: https://www.tm1forum.com/viewtopic.php?f=21&t=15820&p=78854&hilit=unlinksheet#p78854

Screenshots Picture1

Code: `Sub test()

Dim o                     As Object
''Dim oMessageSuppressor As CognosOfficeMessageSuppressor
''Set oMessageSuppressor = New CognosOfficeMessageSuppressor

Set o = Application.COMAddIns("CognosOffice12.Connect").Object.AutomationServer.Application("COR", "1.1")
o.UnlinkSheet

End Sub

oMessageSuppressor is not supposed to suppress the confirmation msgbox I assume ? At least it still asks the question at run time. ` Browser (please complete the following information):

Last upstream Slate commit (run git log --author="\(Robert Lord\)\|\(Matthew Peveler\)\|\(Mike Ralphson\)" | head -n 1): Put the commit hash here

wimgielis commented 3 years ago

Put differently, could someone share a working sample code in VBA (PAFE) to refresh a sheet containing a dynamic report and turn it into hard values ? Thanks in advance !

wimgielis commented 3 years ago

Got it. It’s Application.DisplayAlerts = False

Op vr 6 aug. 2021 om 11:00 schreef Wim Gielis @.***>

Put differently, could someone share a working sample code in VBA (PAFE) to refresh a sheet containing a dynamic report and turn it into hard values ? Thanks in advance !

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/IBM/paxapi/issues/31#issuecomment-894115612, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDHULK5RCVQ5ZN7M33J5ILT3OQD3ANCNFSM5BVMSOEQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

--


Best regards / Beste groeten,

Wim Gielis MS Excel MVP 2011-2014 https://www.wimgielis.com http://www.wimgielis.be

tedphillips commented 3 years ago

yes pa for excel will follow excel's display alerts state, suppress messages still exists but primarily for heritage reasons (and is harder to use).