LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Application-Defined Error 1004

In a macro that checks for a number of errors and sets the zoom, print range,
and page breaks for each worksheet, I'm getting this error on the Set rngLast
line:

For Each wrksht In ActiveWorkbook.Worksheets

With wrksht
.Activate
intLastRow = GetLastRow()

If intLastRow < 0 Then

' Reset zoom and view
With ActiveWindow
.View = xlNormalView
.Zoom = intZoom
End With

' Assign print range and set page breaks
Set rngLast = Cells(intLastRow, fintHeaderColumn())
.PageSetup.PrintArea = "$A$1:" & rngLast.Address
Call SetPageBreaks(intLastRow)

Does anyone know why?

Sprinks
 
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
Application-Defined or object defined error 1004 When ran on exel97 but not 2003 bornweb Excel Programming 0 February 17th 07 11:30 PM
Runtime error 1004- application defined or object defined erro Novice Excel Programming 0 February 6th 06 09:34 PM
Runtime error 1004- application defined or object defined erro Novice Excel Programming 1 February 6th 06 09:33 PM
Runtime error 1004- application defined or object defined erro Jim Thomlinson[_5_] Excel Programming 0 February 6th 06 09:29 PM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM


All times are GMT +1. The time now is 11:44 AM.

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

About Us

"It's about Microsoft Excel"