Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro terminates early without error message

Macro terminates early without error message. This has occured several times
in code that was working literally for years. If I trace the execution in
Debug mode the macro just ends short. No errors. On error resume next has no
effect. On error goto 0 has no effect.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Macro terminates early without error message

You're goiing to have to step through the code to determine where it's
failing. Put in a bunch of debug.prints to figure out where it might be.
When you find it, post that piece of code and someone should be able to help
you.
--
HTH,
Barb Reinhardt



"Richard J. Snee" wrote:

Macro terminates early without error message. This has occured several times
in code that was working literally for years. If I trace the execution in
Debug mode the macro just ends short. No errors. On error resume next has no
effect. On error goto 0 has no effect.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro terminates early without error message

With ActiveSheet.PageSetup
.PrintTitleRows = "$101:$105" 'macro ends here
.PrintTitleColumns = ""
End With

"Richard J. Snee" wrote:

Macro terminates early without error message. This has occured several times
in code that was working literally for years. If I trace the execution in
Debug mode the macro just ends short. No errors. On error resume next has no
effect. On error goto 0 has no effect.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Macro terminates early without error message

On Apr 16, 7:08 pm, Richard J. Snee
wrote:
With ActiveSheet.PageSetup
.PrintTitleRows = "$101:$105" 'macro ends here
.PrintTitleColumns = ""
End With

"Richard J. Snee" wrote:
Macro terminates early without error message. This has occured several times
in code that was working literally for years. If I trace the execution in
Debug mode the macro just ends short. No errors. On error resume next has no
effect. On error goto 0 has no effect.


Those few lines all by themselves is no problem for me ... in Page
Setup afterwards it says "Rows to repeat at top:" $101:$105

Chris
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Macro terminates early without error message

What's the address of your print area? I didn't get the printtitlerows to
display if the print area was above the print titles. I'm wondering if
that's an issue with you.

Does it give an error of any kind?

Barb Reinhardt



"cht13er" wrote:

On Apr 16, 7:08 pm, Richard J. Snee
wrote:
With ActiveSheet.PageSetup
.PrintTitleRows = "$101:$105" 'macro ends here
.PrintTitleColumns = ""
End With

"Richard J. Snee" wrote:
Macro terminates early without error message. This has occured several times
in code that was working literally for years. If I trace the execution in
Debug mode the macro just ends short. No errors. On error resume next has no
effect. On error goto 0 has no effect.


Those few lines all by themselves is no problem for me ... in Page
Setup afterwards it says "Rows to repeat at top:" $101:$105

Chris



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Macro terminates early without error message

Also, can you check to see if the activesheet.name is what you expect it to be?
--
HTH,
Barb Reinhardt



"Richard J. Snee" wrote:

With ActiveSheet.PageSetup
.PrintTitleRows = "$101:$105" 'macro ends here
.PrintTitleColumns = ""
End With

"Richard J. Snee" wrote:

Macro terminates early without error message. This has occured several times
in code that was working literally for years. If I trace the execution in
Debug mode the macro just ends short. No errors. On error resume next has no
effect. On error goto 0 has no effect.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro terminates early without error message

Activesheet is correct.
Added three line to see if I could get any error feedback...no luck nothing...
Print area is set to C106:AM137
Notice Titles rows property does get set but macro terminates.

I'm gressing that something in the environment is causing this. Maybe Live
Link or some othe software in Shell's system is putting some hidden "hooks"
into Excel. Some how these get triggered and the code "fails" in a hidden
module. I am hoping someone has seen this and has some idea what is going on.
The code that is failing is simple and has worked for years...does anyone
have any ideas?


Application.DisplayAlerts = True ' added to see if I can get an
error message
Application.ScreenUpdating = True ' added to see if I can get an
error message
On Error GoTo 0 ' added to see if I can get an
error message

ActiveSheet.PageSetup.PrintArea = "$C$106:$AM$" & BottomOfData '
Bottomofdata = 137
ActiveWindow.ScrollRow = 1
With ActiveSheet.PageSetup
.PrintTitleRows = "$101:$105" ' macro terminates here without
error message
.PrintTitleColumns = ""

End With





"Barb Reinhardt" wrote:

Also, can you check to see if the activesheet.name is what you expect it to be?
--
HTH,
Barb Reinhardt



"Richard J. Snee" wrote:

With ActiveSheet.PageSetup
.PrintTitleRows = "$101:$105" 'macro ends here
.PrintTitleColumns = ""
End With

"Richard J. Snee" wrote:

Macro terminates early without error message. This has occured several times
in code that was working literally for years. If I trace the execution in
Debug mode the macro just ends short. No errors. On error resume next has no
effect. On error goto 0 has no effect.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro ends early without error message Richard J. Snee Excel Programming 3 January 29th 08 06:56 PM
Macro terminates upon opening text file hmm Excel Programming 0 June 27th 07 04:40 PM
Setting .OnAction of a command button terminates my macro..... [email protected] Excel Programming 4 August 18th 05 03:46 PM
Error or Unexpected Behavior with Office Automation when you use early binding Barb[_5_] Excel Programming 3 September 15th 04 03:17 PM
macro terminates with no error pH7[_3_] Excel Programming 3 April 26th 04 08:49 PM


All times are GMT +1. The time now is 04:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"