PrintOut problems

  • Hey again, I am sure this is pretty simple, i just cant figure out why i am getting an error on this. I want to print out the first page of every worksheet in the workbook. so I am using this routine:

    Sub PrintPage1()
    Dim ws As Worksheet
        For Each ws In Worksheets
            If ws.Name Like prefix Then
                 ws.PrintOut( 1, 1) 'here i get "expect =" syntax error
            End If
    End Sub

    As my comment notes...i am getting a syntax error, msdn examples use the same format i am....what am i doing wrong? thanks!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!