VBA how to give a table in Excel a custom table style -
simple question can't seem find reply anywhere i'll set here: how assign table styles tables, yet not map default table style i.e. create custom style elements? read might involve .tablestyleelements
when tried add together activesheet.listobjects("table1").tablestyleelements(xlheaderrow).font.color = rgb(119, 184, 0)
breaks. getting syntax wrong?
i believe need declare table style first eg:
dim otblstyle tablestyle set otblstyle = activesheet.listobjects("table1").tablestyle otblstyle.tablestyleelements.item(xlheaderrow).font.color = rgb(119, 184, 0)
excel vba
No comments:
Post a Comment