Afternoon All,
Must be a really simple thing but i cant get it right.
I have workbook 1 called Pub_workbook (its a public variable)
In that i have a number of sheets (spreadsheet which is passed in as a parameter).
My VB code copies each sheet one at a time to a new workbook “Book1”.
I want to copy over the colour of the tab also from Pub_workbook to Book1.
At the moment im doing:
ActiveWorkbook.Sheets(spreadsheet).Tab.ColorIndex = Colour
where i pass in the number for code.
I want to change this so that the new sheet will get the colour from the original sheet.
Ive tried:
ActiveWorkbook.Sheets(spreadsheet).Tab.ColorIndex = Pub_workbook.Sheets(spreadsheet).Tab.ColorIndex
but get error:
Run Time error ‘424’
Object Required.
can anyone give me pointers as to where / what i have wrong?