View Single Post
 
Old 05-30-2018, 06:33 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

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
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote