sketches from excel

Use this forum to post Vensim related questions.
Post Reply
jaimonides
Junior Member
Posts: 4
Joined: Mon Dec 12, 2005 5:07 pm

sketches from excel

Post by jaimonides »

Hello:
I use to work with visual basic applications. Theses DSS can be used to manage vensim models from excel. Does anybody knows how to view vensim sketches from excel?
Thank you very much
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

It seems like it should be easy, but I cannot seem to work out a way of getting a handle to a window using VBA.

The function you need is vensim_show_sketch, the final parameter you pass to the function needs to be the hWnd of the image/frame where you want the sketch to appear.

The only problem is finding the hWnd. The MSDN website (http://msdn.microsoft.com/library/defau ... indows.asp)
says
"A Visual Basic Form object has an hWnd property we can use, but a VBA UserForm object does not include a property or method for getting at its window handle".

Does anyone else know how to get the hWnd of a control using VBA?

Tony.
Post Reply