Some weirdness I don't understand here. Small routine here that launches an email composition window. Target.Row is returning the correct row when clicked and concatenates correctly when done as a separate variable (see ??? section in middle). When I use it directly within the 'With MItem' block it pulls the values from the next row of the spreadsheet, not the row indicated by the Target.Row value. ex: row #3 is clicked on, and it loads the values from row #4. When I use a pre-concatenated variable, it pulls the correct cell values. Any ideas?? Thanks in advance for any help.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
' checking to see if update number cell is picked
If Not Intersect(Target, Range("B3:B50")) Is Nothing Then
' testing for blank subject box
If (Worksheets("Email").Range("C" & Target.Row).Value <> "") Then
' initialize variables
Dim OutlookApp As Outlook.Application
Dim MItem As Outlook.MailItem
Dim sBlock As String
' ????
Dim nTest As Integer
Dim sRange As String
nTest = Target.Row
sRange = "C" & Target.Row
' creating html signature block
sBlock = "<br><br><font size=4>Name Here</font><br>"
sBlock = sBlock & "<font size=2><b>Title</b><br>"
sBlock = sBlock & "<b>phone 1</b><br>"
sBlock = sBlock & "<b>phone 2</b></font><br>"
'Create Outlook object
Set OutlookApp = New Outlook.Application
'Create Mail Item and view before sending
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = Worksheets("Emails").Range("D" & Target.Row).Value
.Subject = Worksheets("Emails").Range("C" & Target.Row).Value
.HTMLBody = Worksheets("Emails").Range("E" & Target.Row).Value & sBlock
.Display
End With
End If
End If
End Sub