Change Even involving Table or List Object

NorthbyNorthwest

Board Regular
Joined
Oct 27, 2013
Messages
173
Office Version
  1. 365



I have a small bit of code I’d like to use listobjectlanguage with.

Code:
[FONT=Times New Roman][/FONT]
Private Sub Worksheet_Change(ByVal Target As Excel.Range)<o:p></o:p>
[FONT=Times New Roman][/FONT]
If Intersect(Target, [Z:Z]) Is Nothing Or Target.Count >1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/FONT]
    Target.Offset(, 1)= Date<o:p></o:p>
[FONT=Times New Roman][/FONT]
    Target.Offset(,2).Formula = "=IF(OR([@[Status Change]]=""Completed"",[@[StatusChange]]=""code yellow"",[@[StatusChange]]="""",[@[Date of StatusChange]]=""""),"""",TODAY()-[@[Date ofStatus Change]])"<o:p></o:p>
[FONT=Times New Roman][/FONT]
End Sub<o:p></o:p>
[FONT=Times New Roman][/CO[/FONT]DE]

[FONT=Times New Roman][/FONT]
I’ve tried swapping out the first line with:<o:p></o:p>
[FONT=Times New Roman][/FONT]
[CODE][FONT=Times New Roman][/FONT]
If Intersect(Target,Me.ListObjects("Table1").ListColumns(26).DataBodyRange) Is Nothing OrTarget.Count > 1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/CO[/FONT]DE]

I've also tried:

[CODE][FONT=Times New Roman][/FONT]
If Intersect(Target, Me.ListObjects("Table1").ListColumns(“StatusChange”).DataBodyRange) Is Nothing Or Target.Count > 1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/CO[/FONT]DE]

And, I've tried:

[CODE[FONT=Times New Roman]][/FONT]
If Intersect(Target, [Table1[ColumnZ]]) Is Nothing orTarget.Count>1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/C[/FONT]ODE]

What am I doing wrong?
[/COLOR] 
[/SIZE] 
[/FONT] 
[FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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