Hi Folks,
Interesting situation here with the environ(SESSIONNAME) function.
I need to know from which environment the Excel is running from: local, TS or Citrix.
I run an .xls on local machine under Excel 03, on TS under Excel 03 and on Citrix under 2013. The xls is run by the users in either 2 methods:
1. start up Excel THAN open the xls file, or
2. double-click on the xls file in Winexplorer which opens an instance of Excel.
On the local machine the resulting value is "Console". Just what I want.
SESSIONNAME=Console
On TS virtual machine, boths methods returns a value beginning with "RDP-". Again just what I want.
SESSIONNAME=RDP-Tcp#30
On Citrix virtual machine, method 1 returns a value "ICA-"
SESSIONNAME=ICA-TCP#1
which is fine but in method 2 the sessionname is no where to be found.
I used the following code to get all environ() function values.
Option Explicit
Sub GetEnvironVariables()
' ---------------------------------------------------------
' List all the available Environ information
' Environ Function returns info about the operating system
' Info will be listed in the Immediate Window (Ctrl+G)
' ---------------------------------------------------------
' ---------------------------------------------------------
' To ensure you see the result, I used SendKeys to open
' the vbe, and then display the Immediate Window
SendKeys "%{F11}", True
SendKeys "^g", True
GoTo RunProc
' ---------------------------------------------------------
RunProc:
Dim i As Integer
i = 1
While Environ(i) <> Empty
Debug.Print Environ(i), i
i = i + 1
Wend
End Sub
Can you help me determine what is going on here?
Is it a Citrix profile or security problem or Excel 2013 reacting differently?
Thanks
Interesting situation here with the environ(SESSIONNAME) function.
I need to know from which environment the Excel is running from: local, TS or Citrix.
I run an .xls on local machine under Excel 03, on TS under Excel 03 and on Citrix under 2013. The xls is run by the users in either 2 methods:
1. start up Excel THAN open the xls file, or
2. double-click on the xls file in Winexplorer which opens an instance of Excel.
On the local machine the resulting value is "Console". Just what I want.
SESSIONNAME=Console
On TS virtual machine, boths methods returns a value beginning with "RDP-". Again just what I want.
SESSIONNAME=RDP-Tcp#30
On Citrix virtual machine, method 1 returns a value "ICA-"
SESSIONNAME=ICA-TCP#1
which is fine but in method 2 the sessionname is no where to be found.
I used the following code to get all environ() function values.
Option Explicit
Sub GetEnvironVariables()
' ---------------------------------------------------------
' List all the available Environ information
' Environ Function returns info about the operating system
' Info will be listed in the Immediate Window (Ctrl+G)
' ---------------------------------------------------------
' ---------------------------------------------------------
' To ensure you see the result, I used SendKeys to open
' the vbe, and then display the Immediate Window
SendKeys "%{F11}", True
SendKeys "^g", True
GoTo RunProc
' ---------------------------------------------------------
RunProc:
Dim i As Integer
i = 1
While Environ(i) <> Empty
Debug.Print Environ(i), i
i = i + 1
Wend
End Sub
Can you help me determine what is going on here?
Is it a Citrix profile or security problem or Excel 2013 reacting differently?
Thanks