Run Time Error 424 - Object Required

Foynxter1

New Member
Joined
Sep 29, 2016
Messages
40
Hi, I hope that someone can help me.
I have taken a copy of some script to use in sending e-mails from Excel.
The subject of the e-mail will be the value of "topic" on the active row.
The code I have used is as follows - (top of the code only as it is quite long )

Sub TMS_request()
'
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
Dim RangetoHTML As String
Dim cell As Range
Dim strbody As String
Dim emailRng As Range, cl As Range
Dim sTo As String
Dim ccRange As Range, cnt As Range
Dim cTo As String
Dim topic As String

topic = Range("X" & Target.Row)

Unfortunately I am getting the error
"Run time Error 424"
Object Required

Any assistance would be very welcome. Thanks
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

dmt32

Well-known Member
Joined
Jul 3, 2012
Messages
7,912
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Hi,
You have not declared your object variable "Target" & set a reference to it - n[FONT=&quot]o actual object is referred to until you use the [/FONT]Set[FONT=&quot] statement to assign the required range.

Replace Target.Row with [/FONT]
ActiveCell.Row & see if this solves your problem.[FONT=&quot]

Dave[/FONT]
 
Upvote 0

Forum statistics

Threads
1,187,189
Messages
5,962,116
Members
438,586
Latest member
flickalok

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
Top