M
Michael
Hello everyone,
I need to be able to have 28 text boxes, rectangles, etc.... anything that
will make between 1 and 28 rectangles so that if I have less than 28 checks
there will still be 28 boxes (i.e. 2 checks = 26 blank text boxes, 4 checks
= 24 blank text boxes, etc...).
Duane gave me this code:
Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 26
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
But it gives me an error when I use it.
Error title Microsoft Visual Basic
Run-time error '6':
Overflow.
Maybe I'm applying the code at the wrong place.
Any help? You out there Duane
I need to be able to have 28 text boxes, rectangles, etc.... anything that
will make between 1 and 28 rectangles so that if I have less than 28 checks
there will still be 28 boxes (i.e. 2 checks = 26 blank text boxes, 4 checks
= 24 blank text boxes, etc...).
Duane gave me this code:
Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 26
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
But it gives me an error when I use it.
Error title Microsoft Visual Basic
Run-time error '6':
Overflow.
Maybe I'm applying the code at the wrong place.
Any help? You out there Duane