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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

OLE Objects 2
VB6 Component Issue with TDBGRID 0
OLE Object Linking 1
OLE object 1
OLE Server may Not Be Registered 1
aCCESS 2007 3
Print files stored in OLE fields 2
Capture File Path into table field 2

Back
Top