I've spent a while now writing some report building VBA that is based around the use of QUDefine. It's for use in the French office version, 64 bit 9.0 SP3 U9 server that I look after.
I built it on my laptop though for practical reasons. This is a UK office version, 32 bit 9.0 SP3 U9.
Guess what!
The stuff that I have built locally does not work in my live environment. With a copy of the dev server running in the live 64 bit environment the Qudefine statement that returns a true result in my local environment returns “Erreur 2015†in the French 64 bit environment.
I’m thinking there are 3 options as to the problem.
1. User error…
2. Differences in the French VBA environment to the English one.
3. Differences between the 63 bit and 32 bit versions of the software.
I’m pretty sure that I have done my testing in such a way that eliminates any possibility of option 1. Has anyone had any experience of option 2 or 3? Any other options that you might like to add? Anyone have further information in “Erreur 2015â€, is it a straight VBA error or TM1?
I hate wasting time like this… gah!

Truncated code
Code: Select all
Option Explicit
Dim rngQuery As Range, ans As Variant, rngCol As Range, rngRowe As Range
Dim wksQuery As Worksheet, wksSA1 As Worksheet, server As String, cube As String, wksActive As Worksheet
Const QueryName = "zSA1query"
Sub Forum()
Dim ixSheet As Integer, rngCounter As Range, c As Range, rngEntity As Range
Set wksQuery = ThisWorkbook.Worksheets("Query Defn")
Set wksSA1 = ThisWorkbook.Worksheets("SA1")
server = wksQuery.Range("server")
cube = server & wksQuery.Range("Cube")
Set rngQuery = wksQuery.Range("QueryRange")
Set rngCol = wksSA1.Range("colValues")
Set rngRowe = wksSA1.Range("rowValues")
Set rngCounter = wksQuery.Range("Counter")
Set rngEntity = wksQuery.Range("Entity")
'update query
wksQuery.Calculate
ans = Application.Run("Qudefine", cube, QueryName, rngQuery, "", "", "true", "false")
'ans returns true on test system and Erreur 2015 on live system
ans = Application.Run("QUSUBSET", cube, QueryName, "Management Information", QueryName)
ans = Application.Run("QUSUBSET", cube, QueryName, "Sub-analysis 1", QueryName)
End Sub