Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Everything is working with the exception of the final result. I have the
potential for some really long file paths and names. The problem is that the three footer elements (leftfooter, centerfooter and rightfooter) are bottom justified. All three are used as follows: dd/mm/yyyy page Company Name Very long file path and name.xls If all three footer elements were top justified the problem would be solved. I have tried adding carriage returns ( chr(13) ) in the left and center footer which works. However I cannot tell how many lines my right footer is going to be, 2 or 3. I have tried character counting but the combination of flexible character width and automatic wrapping on a space and a dash only make that idea very difficult to program. Any ideas? The code I have used thusfar for setting the footer is as follows: vFont = "&""Times New Roman,Regular""&8" vFile = " &F" vCR = Chr(13) vCoName = "CompanyName" ' Assign date to left footer variable vLeftFooter = vFont & "&D" ' Assign page number to center footer variable vCenterFooter = vFont & "&P" ' Assign company name, carriage return and file path to right footer variable vRightFooter = vFont & vCoName & vCR & vPath & vFile ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftFooter = vLeftFooter .CenterFooter = vCenterFooter .RightFooter = vRightFooter End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I prevent a long string of text from wrapping in a text fil | Excel Discussion (Misc queries) | |||
Programming Challenges! | Excel Programming | |||
Delete automatic headers/footers in dropdown lists in Excel 2003 | Excel Discussion (Misc queries) | |||
Double-byte challenges. Please help! | Excel Programming | |||
Automatic word wrapping on the formula ... don't know its name | Excel Programming |