Trying to use DDE to connect Excel to Vensim DSS on a windows 8.1 virtual machine (VM) which seems to hang Excel (specifically when you call DDEInitiate). I have no problems with the same VBA script (code reproduced below if needed) on a standard PC with windows 8.1 and vensim DSS. Also a previous incarnation with windows 7 VM and Vensim worked with no problem. Does anybody have ideas what is different on a win 8.1 VM or some process that I need to ensure is running on the VM for DDE to work?
Option Explicit
Dim DDE_channel As Integer
Function StartupDDE() As Boolean
Dim blnIsRunning As Boolean
On Error GoTo Err_Handler
blnIsRunning = VensimRunningCheck
'Check to see if Channel Number has already been assigned
If Not DDE_channel > 0 Or blnIsRunning = False Then
'Channel not assigned - check to see if Vensim running
If blnIsRunning = False Then
'Vensim not running - try to open
Dim RetVal
RetVal = Shell("C:\Program Files (x86)\Vensim\Vensim.exe", vbMaximizedFocus)
AppActivate "Microsoft Excel"
Excel.Application.Visible = True
End If
'Connect to Vensim
DDE_channel = Application.DDEInitiate("VENSIM", "System")
End If
StartupDDE = True
Exit Function
Err_Handler:
MsgBox "There was an error trying to connect to Vensim. Please close and reopen Vensim manually", vbExclamation + vbOKOnly, "Vensim Connect Error"
StartupDDE = False
End Function