PC Review


Reply
Thread Tools Rate Thread

CODE in Access running excel will NOT set PrintTitleRows correctly

 
 
BlueWolverine
Guest
Posts: n/a
 
      26th Oct 2009
Hello,
MS Access/Excel 2003 on XP PRO.

I have code that exports a query, opens it in excel, formats and closes it.

A part of this code assigns row one as the "Header" Row so that it prints on
every page.
With .ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
End With


It runs perfect, returns NO error message, passes everytime, but then I go
to the excel file and there is NO header Row? What the ^&%$ is happening?

Thanks.

--
BlueWolverine
MSE - Mech. Eng.
Go BLUE!
 
Reply With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      26th Oct 2009

I assume the printout looks fine
Does the code save the workbook after copying the headers?

"BlueWolverine" wrote:

> Hello,
> MS Access/Excel 2003 on XP PRO.
>
> I have code that exports a query, opens it in excel, formats and closes it.
>
> A part of this code assigns row one as the "Header" Row so that it prints on
> every page.
> With .ActiveSheet.PageSetup
> .PrintTitleRows = "$1:$1"
> .PrintTitleColumns = ""
> End With
>
>
> It runs perfect, returns NO error message, passes everytime, but then I go
> to the excel file and there is NO header Row? What the ^&%$ is happening?
>
> Thanks.
>
> --
> BlueWolverine
> MSE - Mech. Eng.
> Go BLUE!

 
Reply With Quote
 
BlueWolverine
Guest
Posts: n/a
 
      26th Oct 2009
Yes it does. the last thing I do before I close the workbook and the excel
object is save the workbook. (otherwise, as I found out in an especially
frustrating evening, the formatting doesn't take.)

What does that do?

--
BlueWolverine
MSE - Mech. Eng.
Go BLUE!


"Patrick Molloy" wrote:

>
> I assume the printout looks fine
> Does the code save the workbook after copying the headers?
>
> "BlueWolverine" wrote:
>
> > Hello,
> > MS Access/Excel 2003 on XP PRO.
> >
> > I have code that exports a query, opens it in excel, formats and closes it.
> >
> > A part of this code assigns row one as the "Header" Row so that it prints on
> > every page.
> > With .ActiveSheet.PageSetup
> > .PrintTitleRows = "$1:$1"
> > .PrintTitleColumns = ""
> > End With
> >
> >
> > It runs perfect, returns NO error message, passes everytime, but then I go
> > to the excel file and there is NO header Row? What the ^&%$ is happening?
> >
> > Thanks.
> >
> > --
> > BlueWolverine
> > MSE - Mech. Eng.
> > Go BLUE!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CODE for EXCEL output not executing in access - PrintTitleRows BlueWolverine Microsoft Access 4 24th Jan 2010 06:03 PM
Running Excel Code from Access Fester Microsoft Access 9 4th Aug 2009 07:13 PM
VBA - Code stops running correctly Joe Microsoft Access Form Coding 2 30th Oct 2008 10:16 PM
Running Excel macro from Access code amanda.pinckard@gmail.com Microsoft Access 2 18th Feb 2008 09:05 AM
Code for running an excel macro from access =?Utf-8?B?TWF0dA==?= Microsoft Access 1 8th Oct 2004 01:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:10 PM.