I am trying to determine by VBA in Excel 2013 if the ActiveCell is not just in any table, but in a specific table.
Below is the code as is, but only detects ActiveCell being in any table. The commented out line is what I'm looking for, but obviously it doesn't work.
... Set rng = Intersect(.EntireRow, ActiveCell.ListObject.DataBodyRange) 'Set rng = Intersect(.EntireRow, ActiveCell.ListObjects("myTable").DataBodyRange) On Error GoTo 0 If rng Is Nothing Then MsgBox "Please select the cell of a row within the consensus input table.", vbCritical, "Delete Evaluator" Else ...
Any suggestions on the right syntax for this?
Thanks!
ActiveCell
? It can be very temperamental – Chrismas007