ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   2k7: Setting print titles in VBA - bug or feature ? (https://www.excelbanter.com/excel-programming/423077-2k7-setting-print-titles-vba-bug-feature.html)

AlexT

2k7: Setting print titles in VBA - bug or feature ?
 
A wierd one...

I have some code that defines print titles in a worksheet:

myWorksheet.PageSetup.PrintTitleRows = "$1:$6"

This works fine when running said code within an interactive session.

However I also have to run this macro while running Excel as a COM
object from another "master" process (say a whs script). In that case
the above code doesn't seem to work (no error but the print title is
simply flushed from the worksheet).

Out of despair I have also tried

myWorksheet.Parent.Names.Add Name:="Print_titles",
RefersToLocal:="MySheetName!$1:$6"

to no avail...

Any idea / suggestion would be most appreciated !

--alexT


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com