Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 james
		
			james
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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

 michael_anthony
		
			michael_anthony
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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(....)
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 james
		
			james
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It works once than the 2nd try it renders the same message .
 
					
				
		
 james
		
			james
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Anyone? anyone?
 
 michael_anthony
		
			michael_anthony
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		what does the BU1 do when you press it? perhaps the action it triggers is compromising your environment and leaving something open.
