Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Saintsman
Test it in 2003 without a problem Send me the test file private and I test it on my system -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Saintsman" wrote in message ... Ron Excel 2003 Experimented last night on different pc = same result If I remove the code the print all sheets works Odd? "Ron de Bruin" wrote: Can't reproduce this Which Excel version do you use ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Saintsman" wrote in message ... Ron Something strange occurring! I cannot select multiple sheets - every time I select more than 1 sheet to print it defaults to the 'active sheet' only. Never experienced this before so i assume it is something to do with the code - this is the only code I have in the spreadsheet Any ideas? Regards Saintsman "Ron de Bruin" wrote: Sorry, use this Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In ThisWorkbook.Worksheets wkSht.PageSetup.RightFooter = _ Sheets("sheet1").Range("A1").Value & Chr(10) & _ Sheets("sheet1").Range("A2").Value & Chr(10) & _ Sheets("sheet1").Range("A3").Value Next wkSht End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Saintsman" wrote in message ... Stupendously quick reply - thanks! Minor problem - it gives blank rows between each row - any thoughts? Saintsman "Ron de Bruin" wrote: Hi Saintsman You can use cell values in your header if you want Try this event in the thisworkbook module (untested) Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In ThisWorkbook.Worksheets wkSht.PageSetup.RightFooter = _ Sheets("sheet1").Range("A1").Value & vbNewLine & _ Sheets("sheet1").Range("A2").Value & vbNewLine & _ Sheets("sheet1").Range("A3").Value Next wkSht End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Saintsman" wrote in message ... Being a bit dim after Xmas I'm afraid & cannot see how to do this I want to allow the user to set header in a workbook - all will be the same (apart from a front cover) My plan was to have a worksheet where the user can enter the details, which will vary, and these would then set the workbook headers ie (on 3 rows in the header) cell A1 = Project X cell A2 = Revision 6 cell A3 = date Anyone out there who can fix this for me please. Thanks in anticipation |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lookup using column headers and row headers | Excel Discussion (Misc queries) | |||
Headers | Excel Discussion (Misc queries) | |||
Help with Headers | Excel Discussion (Misc queries) | |||
Row Headers | Excel Discussion (Misc queries) | |||
SQL with no headers | Excel Programming |