setting border property in excel using a vbscript macro -


i have macro written vbscript populated excel worksheet data pulled database. need format line have top border across 3 columns. nothing i've tried works. here's need border

objexcel.cells(rownum + 2, 6).value = "sub total" objexcel.cells(rownum + 2, 8).value ="=sum(h7:h"&finalrownum&")"                'extended cost subtotal' objexcel.cells(rownum + 2, 9).value ="=sum(i7:i"&finalrownum&")"                'low price subtotal' objexcel.cells(rownum + 2, 10).value ="=sum(j7:j"&finalrownum&")"           'list price subtotal' objexcel.cells(rownum + 2, 11).value = "=h"&finalrownum + 1&"*l"&finalrownum + 1        'price quote'       'for included markup going on subtotal quoted items objexcel.cells(rownum + 2, 12).value ="2.00" objexcel.cells(rownum + 2, 12).interior.color = rgb(255, 255, 153) 

i got work using this

subtotalrange = "f" &rownum +2&":l"&rownum + 2 objworksheet.range(subtotalrange).borders(8).linestyle= 1 

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -