Dr. Demento
Well-known Member
- Joined
- Nov 2, 2010
- Messages
- 618
- Office Version
- 2019
- 2016
- Platform
- Windows
One of my subs keeps removing a table, so I'm attempting to force table formatting on data. Using code straight from the recorder, it works on a completely blank page but when I attempt to create a table with data already on a page, it creates the table but then stops. The data has some conditional formatting and a Worksheet_SelectionChange sub to highlight the current row/column.
Any thoughts what's going on and how I can work thru this?
Thanks y'all.
Any thoughts what's going on and how I can work thru this?
Thanks y'all.
VBA Code:
Sub Macro5()
'
' Macro5 Macro
'
'
ActiveSheet.ListObjects.add(xlSrcRange, Range("$A$1:$AH$93"), , xlYes).name = _
"Table89"
Range("Table89[#All]").Select
ActiveSheet.ListObjects("Table89").TableStyle = ""
ActiveSheet.ListObjects("Table89").name = "tbl_Updates"
End Sub