eric86vabeach
New Member
- Joined
- Jan 29, 2014
- Messages
- 23
i need help on 2 lines of code
Sub sendemail(subject_line As String, mail_body As String)
Dim olapp As Outlook.Application
Set olapp = CreateObject("outlook.application")
Dim olMail As Outlook.MailItem
setolmail = olapp.CreateItem(olMailItem)
olMail.To = Sheet4.Range("BA") '-this line i need help
olMail.Sub = subject_line
olMail.Body = mail_body
olMail.Send
End Sub
Sub sendmassemail()
row_number = Range("BQ1").Value
Do
DoEvents
row_numbers = row_number + 1
Call sendemail(Sheet4.Range("BD" & row_number), Sheet5.Range("BV2")) '-this line i need help
Loop Until row_number >= 6
End Sub
thanks for reading and thanks
eric
Sub sendemail(subject_line As String, mail_body As String)
Dim olapp As Outlook.Application
Set olapp = CreateObject("outlook.application")
Dim olMail As Outlook.MailItem
setolmail = olapp.CreateItem(olMailItem)
olMail.To = Sheet4.Range("BA") '-this line i need help
olMail.Sub = subject_line
olMail.Body = mail_body
olMail.Send
End Sub
Sub sendmassemail()
row_number = Range("BQ1").Value
Do
DoEvents
row_numbers = row_number + 1
Call sendemail(Sheet4.Range("BD" & row_number), Sheet5.Range("BV2")) '-this line i need help
Loop Until row_number >= 6
End Sub
thanks for reading and thanks
eric