LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Rob
 
Posts: n/a
Default Macro doesn't work but recording it does.

Hi all,
I've recorded the following macro and as it's recording the pagebreak is
deleted without a problem.

Private Sub CommandButton1_Click()
Range("F143").Select
ActiveSheet.HPageBreaks(1).Delete
End Sub

If I try to run the macro (making sure all the conditions are the same. ie
the page break is there), I get the error message "Application - Defined or
Object - Defined Error.

Anyone know why this would happen. (I'm using Office 2000.)

Rob



 
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
Recording a macro ... Marss Excel Discussion (Misc queries) 3 February 17th 05 07:26 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
How do I record a macro which should work on multiple files ? Venkataraman.P.E Excel Discussion (Misc queries) 2 January 16th 05 10:26 AM
Record Macro Relative does not work? lbbss Excel Discussion (Misc queries) 3 December 13th 04 08:43 PM
Record Macro Relative does not work? lbbss Excel Discussion (Misc queries) 1 December 13th 04 07:55 PM


All times are GMT +1. The time now is 11:57 PM.

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"