Ive a universe with some filters defined using VB. If I try to use these prompts from BusinessQuery, the report doesnt work, Is that normal? Because I dont know if BQ should allow this or not
That’s an interesting question! I don’t believe I’ve heard that before. But I bet that within the Excel environment (BusinessQuery) they did not include the links to the VBA portion of the client software. They include links to the query panel, and to the database interface, but really would have no reason to include the VBA portion.
I’m guessing that you’ll find that this is not supported. I don’t have any hard documentation to back that up, but it would not surprise me.
if you run the query from the query panel, nothing happens, you just get again the query panel, but if you try to refresh from BusinessQuery menu you get “Cannot refresh data provider (BQ0091)”
My long-ago experience with VBA and BQ is BusObj Tech Support saying that BQ is intentionally prevented from working with VBA. Something about if it did, no one would need to buy BQ licenses (I don’t know why 'cause I don’t really know VBA).
The error you’re getting is what happens to BQ when it’s looking for an Excel Range Name that doesn’t exist in the Excel file.
When you point to an Excel Range Name (e.g., Account Numbers In List Excel Name(‘Accts’)), it appears in the SQL as @variable. If the Excel Range Name doesn’t appear in the particular Excel File in which you’ve inserted the query (is that grammatically correct?), then the query panel just flashes and reappears. Usually naming the range will fix this problem.
Perhaps you can create an Excel Range Name and update it with your VBA prompt and that’ll work around your particular issue.