Page 1 of 1

TM1 Connection Status

Posted: Sun Oct 23, 2011 5:33 am
by cac692
Hi,

I'm relatively new to VBA and am trying to figure out how I could use VBA to check whether a user's TM1 perspectives application is connected. I'm sure this is simple. I just can't seem to find the answer anywhere though. Any help is appreciated.

Re: TM1 Connection Status

Posted: Sun Oct 23, 2011 5:51 am
by Alan Kirk
cac692 wrote: I'm relatively new to VBA and am trying to figure out how I could use VBA to check whether a user's TM1 perspectives application is connected. I'm sure this is simple. I just can't seem to find the answer anywhere though. Any help is appreciated.
A quick and easy way is just to use a worksheet function that should return a non-zero value if the user is logged in. For example, if there's a dimension that everyone has at least some read access to you could use:
If Application.Run("DIMSIZ","Server:Dimname") = 0 Then
'Not logged in
Else
'Logged in
End If

NB: Post has been moved from the General forum to the Cognos TM1 forum.