Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Again an probleem 1

Status
Not open for further replies.

StormVoogd

Programmer
Apr 19, 2001
10
NL
hia

This time i want to print when there ar 30 rows filled with data, but while testing he has an error that he has not enough memory

i use this as code to print....

If ActiveSheet.Rows >= 30 Then
Worksheet.Print
End if

What am i doing wrong
B-(

 
Try something like this:

Dim tbl As Range
ActiveSheet.Range("A1").Select
Set tbl = ActiveCell.CurrentRegion

If tbl.Rows.Count >= 30 Then
ActiveSheet.PageSetup.PrintArea = tbl.Address
ActiveSheet.PrintOut
End If
 
thanks

i just made another problem

i've put the printoption in a loop

and mij programs are crashed....

fun

Grtz...
:)
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top