Pop Up Box for company name

G

Guest

I have the following code in an excel spreadhseet so when the user clicks the
button a pop up box will appear for them to enter the B# of the user they
would like to send it to. what I would like to add is in the Body another
pop up box feature that will allow the user to input the name of the company.
Is there any way to include this so it will insert the pop up box
information in the sentence??

Private Sub CommandButton2_Click()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)


With OutMail
.To = InputBox("Enter B# of Officer (Format is B#####)")
.CC = ""
.BCC = ""
.Subject = "Commercial Card Package Received"
.Body = "This to confirm receipt of your Commercial Card package for
____. The package will be processed within 2 business days. Go to
http://intranet.bbtnet.com/"
.Send
End With

Set OutMail = Nothing
Set OutApp = Nothing

End Sub
 
B

Bob Phillips

Private Sub CommandButton2_Click()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

With OutMail
.To = InputBox("Enter B# of Officer (Format is B#####)")
.CC = ""
.BCC = ""
.Subject = "Commercial Card Package Received"
.Body = "This to confirm receipt of your Commercial Card package for
" & _
"____. The package will be processed within 2 business
days. " & _
"Go to http://intranet.bbtnet.com/" & vbNewLine & vbNewLine
& _
"Company: " & InputBox("Enter company name")
.Send
End With

Set OutMail = Nothing
Set OutApp = Nothing

End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top