PDA

View Full Version : Solved: Insert Header problem...



alu
08-20-2007, 03:02 AM
Hi, got this code which inserts the a header into a workbook. It was working untill I started playing with it...now it doesn't. The debugger stops at the commented line but I cant quite work out what is happening/ missing.

any ideas? thanks...

'Insert Header
Sheets(Array("Solutions", "Colin ", "Richard ", "Mark ", _
"Julie ", "Jeff ")).Select
Sheets("Solutions").Activate
Range("A1").Select
Workbooks.Open FileName:= _
"D:\My Documents\Header template.xls"
Sheets("Header").Select //Problem lies here is there a missing ""?
Rows("1:1").Select
Selection.Copy
Windows("download.xls").Activate
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
Sheets("Solutions").Select

rory
08-20-2007, 03:44 AM
Is there definitely a sheet called Header in the Header Template workbook? (It hasn't been renamed/misspelled or entered with a trailing space so it's actually "Header "?)

alu
08-20-2007, 03:48 AM
Is there definitely a sheet called Header in the Header Template workbook? (It hasn't been renamed/misspelled or entered with a trailing space so it's actually "Header "?)

D'oh! you right the sheet was called Header Template


THanks rory!

rory
08-20-2007, 04:14 AM
It's always the little things that get you! :)