PDA

View Full Version : Sleeper: Merge styles



lior03
07-13-2005, 06:25 AM
hello
i would like to merge style of 2 workbooks.i used the following code

Workbooks.Open filename:="bill of rights.xls"
ActiveWorkbook.Styles.Merge Workbook:=Workbooks("bill of rights.xls")
it did not work.
whats wrong with the code and is there another way to copy styles
from one workbook to another istead of merge them
thanks

BlueCactus
07-13-2005, 11:30 PM
I'm taking a guess here, but doesn't "bill of rights.xls" become the ActiveWorkbook when you open it? If so, you'll need to Workbooks("<insert other book name>").Activate before you ActiveWorkbook.Styles.Merge.