11.07.2015 Views

Automate Scheduler Using Macros

Automate Scheduler Using Macros

Automate Scheduler Using Macros

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6: PropertiesWarnPriorToDelete PropertySyntaxOptions.WarnPriorToDeleteApplies ToOptionsDescriptionSets or returns whether <strong>Scheduler</strong> prompts the user before deleting atask.DiscussionUse this property to warn the user that a task is about to be deleted andenable the user to cancel the action. If this property is set to True, awarning appears. If this property is set to False, no warning appears.TypeBooleanAccessRead/WriteExampleThis example demonstrates the use of the WarnPriorToDelete propertyof the Options object.Sub main()Dim objSchedApp As ObjectDim objOptions As ObjectDim strQualifier As StringDim intResponse As IntegerSet objSchedApp = CreateObject("Cognosbatcher.Application")Set objOptions = objSchedApp.OptionsWith objOptions'WarnPriorToDelete is a Boolean propertyIf .WarnPriorToDelete ThenstrQualifier = ""ElsestrQualifier = " not"End IfintResponse = MsgBox("<strong>Scheduler</strong> is currently configured" & _" so that it will" & strQualifier & _" warn the user prior to deleting a row. Do you wish to " & _" toggle this setting?", 259, "Toggle Delete Warning")If intResponse = 6 Then.WarnPriorToDelete = Not(.WarnPriorToDelete)End If.SaveEnd WithSet objOptions = NothingSet objSchedApp = NothingEnd Sub144 <strong>Automate</strong> <strong>Scheduler</strong> <strong>Using</strong> <strong>Macros</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!