Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,259
- Office Version
- 2010
- Platform
- Windows
Hi, i have the code below i was wondering if you can help me with it please, i have entered textbox18, textbox19, and textbox20 anfd this brings back the date into the email but it is in american format how can i change this please in the code?
Also after each textbox i have entered a vbtab, but i want them inline for top and bottom ie the date and area lines how can i do this please?
Also after each textbox i have entered a vbtab, but i want them inline for top and bottom ie the date and area lines how can i do this please?
Code:
Private Sub CommandButton1_Click()
Dim aOutlook As Object
Dim aEmail As Object
Dim rngeAddresses As Range, rngeCell As Range, strRecipients As String
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
aEmail.Body = "Hi There," & Chr(10) & vbCrLf & _
"" & Me.TextBox33.Value & Chr(10) & _
"Date:" & vbTab & Me.TextBox18.Value & vbTab & Me.TextBox19.Value & vbTab & Me.TextBox21.Value & vbCrLf & _
"Area:" & vbTab & Me.TextBox9.Value & vbTab & vbTab & Me.TextBox20.Value & vbTab & vbTab & Me.TextBox22.Value & vbCrLf & _
"" & Me.TextBox17.Value & Chr(10) & vbCrLf & _
"Many thanks " & Chr(10)
aEmail.Recipients.Add "test.test@test.com; test.test@test.com"
aEmail.CC = ""
aEmail.BCC = ""
aEmail.Subject = "Weekly " & Range("D2").Value
aEmail.Display