ole event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
I want to write a code on double clink event of ole object. By doing double
click a specific programme is opened. For example if I I want to open word
document each time, then If I do double click on ole filed it should
automatically open word file. Does any one know what is the actual code to do
this? I am sure code is to be written on double click event but I am not
getting how I can do this?

I will be thankful for some one who can help me on this.

Thanking in advance
Rathi
 
Hi Chetan

You can shell call the app like this

Private Sub ControlName_Click()
Call Shell("Path to app goes here", 1)
End Sub

as an example if your word app is stored on your C drive it may look
something like this.

Private Sub ControlName_Click()
Call Shell("C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE", 1)
End Sub
 
thanks wayne for your help each time.
Cheers

Wayne-I-M said:
Hi Chetan

You can shell call the app like this

Private Sub ControlName_Click()
Call Shell("Path to app goes here", 1)
End Sub

as an example if your word app is stored on your C drive it may look
something like this.

Private Sub ControlName_Click()
Call Shell("C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE", 1)
End Sub
 
Back
Top