You said you used my code but you need to change:
Private Sub Command1_Click()
res = ShellExecute(hWnd, vbNullString, "C:\Documents and Settings\ehicks\Desktop\TrailProvisioningReport.doc", vbNullString, vbNullString, vbNormalFocus)
If res = 31 Then
MsgBox "This file is not associated with a program!", vbCritical, "File Association Error"
Exit Sub
End If
End If
End Sub
TO
Private Sub Command2_Click() ' <----------- Changed
res = ShellExecute(hWnd, vbNullString, "C:\Documents and Settings\ehicks\Desktop\TrailProvisioningReport.doc", vbNullString, vbNullString, vbNormalFocus)
If res = 31 Then
MsgBox "This file is not associated with a program!", vbCritical, "File Association Error"
Exit Sub
End If
End If
End Sub
Swi