View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Daniel Bonallack Daniel Bonallack is offline
external usenet poster
 
Posts: 110
Default Strange error in VBA

I have a line in my code that adjusts the page so that there is no vertical
page break

ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1

This line works fine if you F8 through the code, but if you run the macro,
it returns an error (err.number = 1004, Application-defined or object defined
error)

Any help appreciated!

Daniel