VBA code for contiguous range and table formatting

KimC2504

Board Regular
Joined
Jul 17, 2012
Messages
141
Hi Again, Could someone please help me with the vba code for applying table formatting for a contiguous range. I have the code for the contiguous range ok but can't work out the table formatting
Code:
Set Rng = Range("B2").CurrentRegion
Rng.Select
Code:
ActiveSheet.ListObjects.Add(xlSrcRange, Range(Rng), , xlYes).Name = _
        "Table3"
    Range("Table3[#All]").Select
    ActiveSheet.ListObjects("Table3").TableStyle = "TableStyleLight2"
    ActiveSheet.ListObjects("Table3").ShowAutoFilterDropDown = False
 

Some videos you may like

Excel Facts

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

Watch MrExcel Video

Forum statistics

Threads
1,108,969
Messages
5,525,961
Members
409,673
Latest member
Riseee

This Week's Hot Topics

Top