Insert value in Cell of Selected rows

bigmacholmes

New Member
Joined
Dec 14, 2011
Messages
3
Hi,

I have code written to send an email of selected text when the user presses the save button.
I have message box asking if the work done is urgent
Once the press yes, it sends an email to the desired recipients.
What I would like for it to also do is input the value urgent into column of each row that has been selected to send?

I tried this but it goes out 14 cell from each cell selected.

With Selection
.Offset(.Rows.Count * 0, (.Column - 0) * 14).Value = "URGENT"
End With

typically, columns A thru M are selected on a single or multiple rows at once.

Any suggestions?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
What I would like for it to also do is input the value urgent into column of each row that has been selected to send?

Which col do you want "urgent" in it?

It would be helpful if you posted your full code. Use code tags please.

thx

FarmerScott
 
Upvote 0
i need urgent in column O...

If Selection.Cells.Count < 12 Then
GoTo StopMacro
End If

Dim Sendrng As Range
Dim myStr As String
Dim Comm As String
On Error GoTo StopMacro
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
'
'Set Freeze = ActiveSheet.Range("B1:O1").Select

' Change the number in the If statement below to make the number of selected cell required change

myStr = MsgBox("Is your work Urgent?", vbYesNo, "Urgent??") & vbCrLf & vbCrLf
If Trim(myStr) = vbNo Then
GoTo StopMacro
End If

Set Sendrng = Selection
'Create the mail and send it
With Sendrng

ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
' Set the optional introduction field thats adds
' some header text to the email body.

If Trim(myStr) = vbYes Then
Comm = Application.InputBox("Press Enter or Ok to Send" & vbCrLf, "Enter Comments And Send")
End If


If Trim(Comm) = False Then
GoTo StopMacro
End If


.Introduction = "The list has been updated." & vbCrLf & vbCrLf & Comm


' In the "With .Item" part you can add more options


With .Item
.To = ""
.Subject = "Urgent Work Added!"
.Send
End With
End With
End With
With Row.Selection
.Offset(.Rows.Count * 0, (.Column - 0) * 14).Value = "RUSH"
End With

GoTo StopMacro
'End If
StopMacro:
Exit Sub
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,797
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top