Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All, anyone know why I am getting "Object Required:ActiveDocument...If I restart the PC, it runs once fine...
Set MyApp = CreateObject("QlikTech.QlikView")
Set MyDoc = MyApp.OpenDoc ("c:\Test.qvw","","")
Set ActiveDocument = MyDoc
ActiveDocument.GetSheetObject("BU1").Press
MyDoc.CloseDoc
Set MyDoc = Nothing
MyApp.Quit
Set MyApp = Nothing
I'd suggest putting myApp.ActiveDocument.GetSheet.... the interpreter may not know which application your referring to with your ActiveDocument statement.
I'm not sure you using the ActiveDocument as intended though, why not skip that part and just refer to myDoc.GetSheetObject(....)
Hi,
Try this
Set MyApp = CreateObject("QlikTech.QlikView")
Set MyDoc = MyApp.OpenDoc ("c:\Test.qvw","","")
Set currentDocument = MyDoc
currentDocument.GetSheetObject("BU1").Press
MyDoc.CloseDoc
Set MyDoc = Nothing
MyApp.Quit
Set MyApp = Nothing
OR
Set MyApp = CreateObject("QlikTech.QlikView")
Set MyDoc = MyApp.OpenDoc ("c:\Test.qvw","","")
MyDoc.ActiveDocument.GetSheetObject("BU1").Press
MyDoc.CloseDoc
Set MyDoc = Nothing
MyApp.Quit
Set MyApp = Nothing
Regards,
Jagan.
It works once than the 2nd try it renders the same message .
Anyone? anyone?
what does the BU1 do when you press it? perhaps the action it triggers is compromising your environment and leaving something open.