Page 1 of 1
Need help with SUBDEFINE. Could not find anything that was solved. Please help.
Posted: Mon Jul 04, 2016 9:46 am
by initm1
Hi everyone, I am trying to make SUBDEFINE function work for me.
I have tried multiple ways but couldn't make it work. Please help. below is what I have.
thanks in advance.
Code: Select all
Sub testSubset()
Dim x
ThisWorkbook.Activate
ActiveSheet.Activate
x = Application.Run("SUBDEFINE", "dev1.dev.boa.com:HeadCount", "testVBss", "A1:A10")
Debug.Print x
End Sub
Re: Need help with SUBDEFINE. Could not find anything that was solved. Please help.
Posted: Mon Jul 04, 2016 10:11 am
by Paul Segal
Try replacing "A1:A10" with
Code: Select all
Worksheets("Worksheetname").Range("A1:A10")
The whole thing should read
Code: Select all
x = Application.Run("SUBDEFINE", "dev1.dev.boa.com:HeadCount", "testVBss", Worksheets("Worksheetname".Range("A1:10"))
Obviously, replace Worksheetname with the name of your worksheet.
Re: Need help with SUBDEFINE. Could not find anything that was solved. Please help.
Posted: Mon Jul 04, 2016 11:10 am
by initm1
Hi Paul, I tried the same but still wont work. x returns false. I verified it in Cube Viewer too.
Is there something I could be missing or has the admin disabled this feature? any way to find the reason?
Re: Need help with SUBDEFINE. Could not find anything that was solved. Please help.
Posted: Mon Jul 04, 2016 11:38 am
by Steve Rowe
Are you connected to the server, either with N_Connect or through the front end?
Can you get simple functions like DIMIX to work?
The VBA TM1 client also tends to have an issue with the reconnection of broken connections so for example if your connection expires and then you re log, the front end will work but the VBA doesn't.
Re: Need help with SUBDEFINE. Could not find anything that was solved. Please help.
Posted: Mon Jul 04, 2016 3:15 pm
by initm1
Okay thank you. Let me play around with connection and see if I can make it work. Will post back tomorrow. Good day!
Re: Need help with SUBDEFINE. Could not find anything that was solved. Please help.
Posted: Mon Jul 04, 2016 9:10 pm
by paulsimon
Also try using a named range - simpler than A1:A10