Skip to Content
0
Nov 09, 2006 at 04:40 PM

Getting range of query result in 2004s

23 Views

Hi,

I'm trying to determine range of a result area in a 2004s query using the following code :

Dim myrange As Range

Set myrange = Run("BEXAnalyzer.xla!SAPBEXgetResultRangeByID", "ZSKMILESTONESTEST")

I have also tried this using the technical ID of the query as in RZSCOMPDIR.

This causes a VB error and stops inside the SAPBEXgetResultRangeByID function and says "Object Variable or with block not set" on this line :

Set SAPBEXgetResultRangeByID = pAddin.SAPBEXgetResultRangeByID(ActiveWorkbook.Name, queryID, charName)

Can anyone help ?

Cheers

Sue