Use the ShellExecute API function.
Put the following in the General Declaration section of your form.Then in the click event of a button use code simular to this:VB Code:
Private Declare Function ShellExecute _ Lib "shell32.dll" Alias "ShellExecuteA" ( _ ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As LongBest regardsVB Code:
Private Sub Command1_Click() ShellExecute Me.hwnd, "Open", "c:\TheFileToOpen.doc", "", "", vbNormalFocus




Reply With Quote