HELP!!!!
i have to hand a proect in in an hour and i need to know if anyone can anotate the following code for me or convert it into english that i can understand!
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 Long
Sub WillWages()
Dim Email As String, Subj As String
Dim Msg As String, URL As String, x As Double
Email = "lobbwill@hotmail.com"
Subj = "Wage Details"
Msg = ""
Msg = Msg & "Dear Will, " & vbCrLf & vbCrLf
Msg = Msg & "Please check that the hours worked in and out of school shown below, are correct and that the total is also correct "
Msg = Msg & Range("C7").Text & "" & Range("C7").Text & "" & vbCrLf & vbCrLf & Range("F11").Text & " - " & Range("F13").Text & "" & vbCrLf & vbCrLf & Range("G11").Text & " - " & Range("G13").Text & "" & vbCrLf & vbCrLf & Range("H11").Text & " - " & Range("H13").Text & "" & vbCrLf & vbCrLf
Msg = Msg & "Thank You " & vbCrLf
Msg = Msg & "Klik. "
Subj = Application.WorksheetFunction.Substitute(Subj, " ", "%20")
Msg = Application.WorksheetFunction.Substitute(Msg, " ", "%20")
Msg = Application.WorksheetFunction.Substitute(Msg, vbCrLf, "%0D%0A")
URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg
ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"
End Sub
Thank you soooooo much
Will
i have to hand a proect in in an hour and i need to know if anyone can anotate the following code for me or convert it into english that i can understand!
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 Long
Sub WillWages()
Dim Email As String, Subj As String
Dim Msg As String, URL As String, x As Double
Email = "lobbwill@hotmail.com"
Subj = "Wage Details"
Msg = ""
Msg = Msg & "Dear Will, " & vbCrLf & vbCrLf
Msg = Msg & "Please check that the hours worked in and out of school shown below, are correct and that the total is also correct "
Msg = Msg & Range("C7").Text & "" & Range("C7").Text & "" & vbCrLf & vbCrLf & Range("F11").Text & " - " & Range("F13").Text & "" & vbCrLf & vbCrLf & Range("G11").Text & " - " & Range("G13").Text & "" & vbCrLf & vbCrLf & Range("H11").Text & " - " & Range("H13").Text & "" & vbCrLf & vbCrLf
Msg = Msg & "Thank You " & vbCrLf
Msg = Msg & "Klik. "
Subj = Application.WorksheetFunction.Substitute(Subj, " ", "%20")
Msg = Application.WorksheetFunction.Substitute(Msg, " ", "%20")
Msg = Application.WorksheetFunction.Substitute(Msg, vbCrLf, "%0D%0A")
URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg
ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"
End Sub
Thank you soooooo much
Will