Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Help with Design

The project that I'm working on has up to four pages of text and one page of
values.

The requirement is that a "paragraph" of text not be split between two pages
(bottom of one page and the top of another). The text will always start in
column A. The text is not wrapped in a single cell but the text is in
multiple cells. If a particular rows (column A) is blank - there will be no
text in that row.

The text is flexible in that if (for example) a premium bonus doesn't exist
I'm hiding the rows that deal with that topic ... There could be as few as
two pages and as many as 4 pages of text.

I'm struggling with how to do this. But this is my current thinking... (any
suggestions would be welcome)

Sub SetPages()

Dim TotalHeight As Double
Dim MaxHeight As Double
Dim PRow As Integer
Dim CRow As Integer

Dim Cellcheck As Range

MaxHeight = 77

Set rngsht1 = shtGPA9D.Rows("1:250")
Set Cellcheck = shtGPA9D("A1:A250")
TotalHeight = 0
PRow = 0
CRow = 0

For Each R In rngsht1
If Cellcheck(R) = " " Then
PRow = CRow
CRow = R
End If

TotalHeight = TotalHeight + R.RowHeight
If TotalHeight MaxHeight Then
'pagebreak somehow
'reset my counters

End If
Next R
Debug.Print ("total row height " & totheight)
End Sub

Am I anywhere close???

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
Design a form Cyrus New Users to Excel 2 May 9th 06 06:43 AM
Design [email protected] New Users to Excel 5 November 2nd 05 04:18 AM
Design Michael Excel Programming 2 July 22nd 05 09:39 AM
Hyperlinks Inserted in Design Mode inactive once Exited Design Mod Craig Excel Programming 0 March 16th 05 04:53 PM
Enter Excel Design Mode and Exit Design Mode Bill Lunney Excel Programming 0 August 4th 03 07:48 AM


All times are GMT +1. The time now is 08:28 PM.

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"