Forgive me for the novice question but this is my first time trying to create a hotfile from an Impromptu report using a macro. I am getting an error "Unknown function: ErrHandler" and then another one "Label 'ErrHandler' is missing" I'm assuming this is an obvious fix so could anyone offer a hand? Here is my code:
Sub Main()
on error goto ErrHandler
Dim objImpApp As Object
Dim objImpRep As Object
Dim strHotFileName As String
Set objImpApp = CreateObject("CognosImpromptu.Application.cer3")
Set objImpRep = objImpApp.ActiveDocument
strHotFileName = "\\Dom1\Shared\Intermodal\Team Docs\Reporting\Kelly\G3\G3.ims"
objImpRep.ExportHotFile strHotFileName
objImpRep.CloseReport
objImpApp.Quit
Set objImpRep = Nothing
Set objImpApp = Nothing
ErrHandler:
msgbox "ERROR: " & Err & ": " & Error$
End Sub
Kelly
Sub Main()
on error goto ErrHandler
Dim objImpApp As Object
Dim objImpRep As Object
Dim strHotFileName As String
Set objImpApp = CreateObject("CognosImpromptu.Application.cer3")
Set objImpRep = objImpApp.ActiveDocument
strHotFileName = "\\Dom1\Shared\Intermodal\Team Docs\Reporting\Kelly\G3\G3.ims"
objImpRep.ExportHotFile strHotFileName
objImpRep.CloseReport
objImpApp.Quit
Set objImpRep = Nothing
Set objImpApp = Nothing
ErrHandler:
msgbox "ERROR: " & Err & ": " & Error$
End Sub
Kelly