Consulting

Results 1 to 4 of 4

Thread: Solved: Insert Header problem...

  1. #1
    VBAX Regular
    Joined
    Jun 2007
    Posts
    37
    Location

    Solved: Insert Header problem...

    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...

    [vba] '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[/vba]

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    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 "?)
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    VBAX Regular
    Joined
    Jun 2007
    Posts
    37
    Location
    Quote Originally Posted by rory
    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!

  4. #4
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    It's always the little things that get you!
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •