1

I have a piece of code where a variable (Holdout_date) takes a date in a particular cell and then there is a block of code which is conditioned on the statement: if another variable (lastdte) takes a date equal to Holdout_date then activate sheet(3). However while running this code i am getting error 424(Object required). How do I get past this? Thanks in advance

Dim lastdte As Date
Dim Holdout_date As Date
Holdout_date = Range("A13")
Range("D1048576").End(xlUp).Select
lastrow = ActiveCell.Row
lastdte = Range("B" & lastrow)
If Not lastdte Is Holdout_date Then  
Sheet(3).Activate
End If
Community
  • 1
  • 1
Rajarshi Bhadra
  • 1,826
  • 6
  • 25
  • 41

0 Answers0