DDE with Win 8.1 VM

Use this forum to post Vensim related questions.
Post Reply
drw
Member
Posts: 40
Joined: Wed Mar 25, 2009 1:10 pm

DDE with Win 8.1 VM

Post by drw »

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?

Many thanks in advance,
Dave

Code: Select all

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
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: DDE with Win 8.1 VM

Post by Administrator »

What versions of Office do you have running on these various machines?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
drw
Member
Posts: 40
Joined: Wed Mar 25, 2009 1:10 pm

Re: DDE with Win 8.1 VM

Post by drw »

Using Office 2010. But also tried Excel 2007 and Excel 2003. Same result for all three.

Thanks
Dave
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: DDE with Win 8.1 VM

Post by Administrator »

You could try copying the vensim.ini file from a working machine to the VM and see if that works. You will find it in %APPDATA%\vensim.

Beyond that I'm not sure what to suggest. I don't have the resources to set up a 8.1 VM with Office (and I'm sure it's just a config issue anyway).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply