Sub Form_Load ()Form1.Caption = "Let's Get the Mail"Command1.Caption = "Launch Outlook Express"ShowEnd Sub
Sub Form_Unload (Cancel As Integer)Set Form1 = NothingEndEnd Sub
Sub Command1_Click ()On Error GoTo ErrMsgDim Mke_Email As StringDim Secure_Path As StringDim e As StringDim zz As IntegerRem Launch Outlook ExpressMke_Email = "msimn.exe"Secure_Path = App.Pathe = Secure_Path & "" & Mke_Emailzz = Shell(e, 1)Unload Form1Exit Sub
ErrMsg:Select Case Err Case 53: Msg = "ERROR 53: Outlook Express not found." Case 68: Msg = "ERROR 68: Drive " & Drive & ": not available." Case 76: Msg = "ERROR 76: Path doesn't exist." Case Else: Msg = "ERROR " & Err & " occurred."End Select
End Sub
: : Hello.: : I need to know how to create a button, that when pressed fires up the user's email prog and sends them mail.
: Sub Form_Load (): Form1.Caption = "Let's Get the Mail": Command1.Caption = "Launch Outlook Express": Show: End Sub
: Sub Form_Unload (Cancel As Integer): Set Form1 = Nothing: End: End Sub
: Sub Command1_Click (): On Error GoTo ErrMsg: Dim Mke_Email As String: Dim Secure_Path As String: Dim e As String: Dim zz As Integer: Rem Launch Outlook Express: Mke_Email = "msimn.exe": Secure_Path = App.Path: e = Secure_Path & "" & Mke_Email: zz = Shell(e, 1): Unload Form1: Exit Sub
: ErrMsg:: Select Case Err: Case 53: Msg = "ERROR 53: Outlook Express not found.": Case 68: Msg = "ERROR 68: Drive " & Drive & ": not available.": Case 76: Msg = "ERROR 76: Path doesn't exist.": Case Else: Msg = "ERROR " & Err & " occurred.": End Select
: End Sub
: : : : Hello.: : : I need to know how to create a button, that when pressed fires up the user's email prog and sends them mail.
: : Sub Form_Load (): : Form1.Caption = "Let's Get the Mail": : Command1.Caption = "Launch Outlook Express": : Show: : End Sub
: : Sub Form_Unload (Cancel As Integer): : Set Form1 = Nothing: : End: : End Sub
: : Sub Command1_Click (): : On Error GoTo ErrMsg: : Dim Mke_Email As String: : Dim Secure_Path As String: : Dim e As String: : Dim zz As Integer: : Rem Launch Outlook Express: : Mke_Email = "msimn.exe": : Secure_Path = App.Path: : e = Secure_Path & "" & Mke_Email: : zz = Shell(e, 1): : Unload Form1: : Exit Sub
: : ErrMsg:: : Select Case Err: : Case 53: Msg = "ERROR 53: Outlook Express not found.": : Case 68: Msg = "ERROR 68: Drive " & Drive & ": not available.": : Case 76: Msg = "ERROR 76: Path doesn't exist.": : Case Else: Msg = "ERROR " & Err & " occurred.": : End Select
: : End Sub
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
: I need to know how to create a button, that when pressed fires up the user's email prog and sends them mail.
Sub Form_Load ()
Form1.Caption = "Let's Get the Mail"
Command1.Caption = "Launch Outlook Express"
Show
End Sub
Sub Form_Unload (Cancel As Integer)
Set Form1 = Nothing
End
End Sub
Sub Command1_Click ()
On Error GoTo ErrMsg
Dim Mke_Email As String
Dim Secure_Path As String
Dim e As String
Dim zz As Integer
Rem Launch Outlook Express
Mke_Email = "msimn.exe"
Secure_Path = App.Path
e = Secure_Path & "" & Mke_Email
zz = Shell(e, 1)
Unload Form1
Exit Sub
ErrMsg:
Select Case Err
Case 53: Msg = "ERROR 53: Outlook Express not found."
Case 68: Msg = "ERROR 68: Drive " & Drive & ": not available."
Case 76: Msg = "ERROR 76: Path doesn't exist."
Case Else: Msg = "ERROR " & Err & " occurred."
End Select
End Sub
: : Hello.
: : I need to know how to create a button, that when pressed fires up the user's email prog and sends them mail.
: Sub Form_Load ()
: Form1.Caption = "Let's Get the Mail"
: Command1.Caption = "Launch Outlook Express"
: Show
: End Sub
: Sub Form_Unload (Cancel As Integer)
: Set Form1 = Nothing
: End
: End Sub
: Sub Command1_Click ()
: On Error GoTo ErrMsg
: Dim Mke_Email As String
: Dim Secure_Path As String
: Dim e As String
: Dim zz As Integer
: Rem Launch Outlook Express
: Mke_Email = "msimn.exe"
: Secure_Path = App.Path
: e = Secure_Path & "" & Mke_Email
: zz = Shell(e, 1)
: Unload Form1
: Exit Sub
: ErrMsg:
: Select Case Err
: Case 53: Msg = "ERROR 53: Outlook Express not found."
: Case 68: Msg = "ERROR 68: Drive " & Drive & ": not available."
: Case 76: Msg = "ERROR 76: Path doesn't exist."
: Case Else: Msg = "ERROR " & Err & " occurred."
: End Select
: End Sub
Well, the idea is that you substitute what you do have.
:
: : : Hello.
: : : I need to know how to create a button, that when pressed fires up the user's email prog and sends them mail.
: : Sub Form_Load ()
: : Form1.Caption = "Let's Get the Mail"
: : Command1.Caption = "Launch Outlook Express"
: : Show
: : End Sub
: : Sub Form_Unload (Cancel As Integer)
: : Set Form1 = Nothing
: : End
: : End Sub
: : Sub Command1_Click ()
: : On Error GoTo ErrMsg
: : Dim Mke_Email As String
: : Dim Secure_Path As String
: : Dim e As String
: : Dim zz As Integer
: : Rem Launch Outlook Express
: : Mke_Email = "msimn.exe"
: : Secure_Path = App.Path
: : e = Secure_Path & "" & Mke_Email
: : zz = Shell(e, 1)
: : Unload Form1
: : Exit Sub
: : ErrMsg:
: : Select Case Err
: : Case 53: Msg = "ERROR 53: Outlook Express not found."
: : Case 68: Msg = "ERROR 68: Drive " & Drive & ": not available."
: : Case 76: Msg = "ERROR 76: Path doesn't exist."
: : Case Else: Msg = "ERROR " & Err & " occurred."
: : End Select
: : End Sub