View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Page Breaks Problem ( Please Help)

Hi
add the following line before you insert your pagebreaks (clears all
existing pagebreaks):
wrkSheet.ResetAllPageBreaks

--
Regards
Frank Kabel
Frankfurt, Germany


Hello All.


I am having problem in setting the page breaks. I am only

encountering
the problem when i execute the code the second time. Please try to
understarnd my problem.

- I am generating the excel sheets from text files
- When i complete generating the text file in to the excel sheet.
- I set the page breaks for tha perticular excel sheet.
- When i do it the first time all the things goes fine
- But when i repeat the process or when i convert the second excel
sheet. the process go failed.


This is the line of code that i am executing..... Please Help ...


wrkSheet.HPageBreaks.Add Befo=Cells(Row,

1)wrkSheet.VPageBreaks.Add
Befo=Cells(1, CmbMaxColumns+1)


---
Message posted from http://www.ExcelForum.com/