ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Run-Time Error 424 (https://www.excelbanter.com/excel-discussion-misc-queries/49042-run-time-error-424-a.html)

Jeff

Run-Time Error 424
 
Hello,

I have an error msg: Run-Time Error 424 on this VBA procedu

If ActiveCell.Value = "SP" Then
Set CellWithValueToMatch = ActiveCell.Offset(0, -2).Value
--
Regards,
Jeff


Bryan Hessey


.. just a guess, but

Range("A1").Value = Error(424) shows 'Object required'

could this mean that your ActiveCell is in column A or B ?



Jeff Wrote:
Hello,

I have an error msg: Run-Time Error 424 on this VBA procedu

If ActiveCell.Value = "SP" Then
Set CellWithValueToMatch = ActiveCell.Offset(0, -2).Value
--
Regards,
Jeff



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=473897


Bryan Hessey


... just a guess, but

Range("A1").Value = Error(424) shows 'Object required'

could this mean that your ActiveCell is in column A or B ?



SECOND guess (after testing) is to try removing the word 'Set' and use

CellWithValueToMatch = ActiveCell.Offset(0, -2).Value


--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=473897



All times are GMT +1. The time now is 09:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com