Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with combining strings
Please I need immediate help to understand this. I store values in rmarkfor,
qtenum,dlrname -- I would like the subject line of the email to read like this: To: Iccquote Subject Quote # (the value of qtenum), (value of dlrname), (value of rmarkfor) But it keeps giving me a compile error. Set rmarkfor = Range("C5") Set qtenum = Range("F5") Set dlrname = Range("C7") Set alltext = "Qte #:" & qtenum & "-" & dlrname & rmarkfor With ExlPpsl .SendMail "Iccquote", _ & alltext End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with combining strings
When declaring your variables use strings:
i.e. Dim qtenum as String When setting your variables force a text conversion for each cell. i.e. qtenum = Cstr(Range("F5")) Finally, do not use the word "Set" when assigning your variables. -- Les Torchia-Wells "Rookie_User" wrote: Please I need immediate help to understand this. I store values in rmarkfor, qtenum,dlrname -- I would like the subject line of the email to read like this: To: Iccquote Subject Quote # (the value of qtenum), (value of dlrname), (value of rmarkfor) But it keeps giving me a compile error. Set rmarkfor = Range("C5") Set qtenum = Range("F5") Set dlrname = Range("C7") Set alltext = "Qte #:" & qtenum & "-" & dlrname & rmarkfor With ExlPpsl .SendMail "Iccquote", _ & alltext End With |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with combining strings
How does that get me the results of the subject line?
"Les" wrote: When declaring your variables use strings: i.e. Dim qtenum as String When setting your variables force a text conversion for each cell. i.e. qtenum = Cstr(Range("F5")) Finally, do not use the word "Set" when assigning your variables. -- Les Torchia-Wells "Rookie_User" wrote: Please I need immediate help to understand this. I store values in rmarkfor, qtenum,dlrname -- I would like the subject line of the email to read like this: To: Iccquote Subject Quote # (the value of qtenum), (value of dlrname), (value of rmarkfor) But it keeps giving me a compile error. Set rmarkfor = Range("C5") Set qtenum = Range("F5") Set dlrname = Range("C7") Set alltext = "Qte #:" & qtenum & "-" & dlrname & rmarkfor With ExlPpsl .SendMail "Iccquote", _ & alltext End With |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with combining strings
I should have been more specific:
Dim rmarkfor As String Dim qtenum As String Dim dlrname As String Dim alltext As String rmarkfor = CStr(Range("C5")) qtenum = CStr(Range("F5")) dlrname = CStr(Range("C7")) alltext = "Qte #:" & qtenum & "-" & dlrname & "," & rmarkfor ActiveWorkbook.SendMail "Iccquote", alltext -- Les Torchia-Wells "Rookie_User" wrote: How does that get me the results of the subject line? "Les" wrote: When declaring your variables use strings: i.e. Dim qtenum as String When setting your variables force a text conversion for each cell. i.e. qtenum = Cstr(Range("F5")) Finally, do not use the word "Set" when assigning your variables. -- Les Torchia-Wells "Rookie_User" wrote: Please I need immediate help to understand this. I store values in rmarkfor, qtenum,dlrname -- I would like the subject line of the email to read like this: To: Iccquote Subject Quote # (the value of qtenum), (value of dlrname), (value of rmarkfor) But it keeps giving me a compile error. Set rmarkfor = Range("C5") Set qtenum = Range("F5") Set dlrname = Range("C7") Set alltext = "Qte #:" & qtenum & "-" & dlrname & rmarkfor With ExlPpsl .SendMail "Iccquote", _ & alltext End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find and replace numeric strings in larger text strings | Excel Worksheet Functions | |||
How to find number of pairs of strings from list of strings? | Excel Worksheet Functions | |||
Combining Text Strings - Complex | Excel Worksheet Functions | |||
Combining text strings | Excel Worksheet Functions | |||
Finding strings within strings | Excel Programming |