hi all, can you help please, i am exporting a table from access to excel , this is working ok , what i am now trying to do it just place a top border only on the columns, the number of columns can change as the table can change before export , i have a DIM set up to count the number of columns, [Dim col as integer] this also works , the code i have been using is
.Range("b2:h2").Borders(xlEdgeTop).LineStyle = XlLineStyle.xlContinuous
but i need the value in col to reflect what column to end the borders on, so if col is 5 then the formula would change to ("b2:h2"), (column 5),
if col is 10 then the formula would be ("b2:j2"), (column 10), how do i change the second part of the formula in vba to reflect what is stored in col? .
please remember i am a newbie and this might need explaining as to how any solution works
Bookmarks