View Single Post
 
Old 05-30-2018, 04:02 PM
kiwimtnbkr kiwimtnbkr is offline Windows 10 Office 2010 64bit
Advanced Beginner
 
Join Date: Oct 2017
Posts: 69
kiwimtnbkr is on a distinguished road
Default

Quote:
Originally Posted by gmaxey View Post
Kiwi,

I didn't try to validate txtPages as I thought if left blank (i.e., not is numeric) then you would be printing all pages. As for entering the comma, dash and space that is due to the KeyPress event code. Change it to:

Code:
Private Sub txtPages_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
  m_bTest = IsInteger(KeyAscii)
  If m_bTest = False Then
    Select Case KeyAscii
      Case Is = 32, 44, 45
      Case Else
        Beep
        KeyAscii = 0
    End Select
    Else
      Beep
      KeyAscii = 0
  End If
End Sub
so the one frm would cover both printing the entire document and a selection of pages?
Reply With Quote