Results 1 to 5 of 5

Thread: Backspace Code for a Calculator

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Illinois
    Posts
    27
    I have a calculator project to do I have the code and form for the project and everything works except the back space key...can any one help me with a code?
    I'm a MICKEY FAN

  2. #2
    Guest
    vbKeyBack or 8

    Code:
    'Private Sub Object_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyBack Then
         MsgBox "Backspace pressed!"
    End If
    'End Sub

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Illinois
    Posts
    27
    Is there another way of coding with out using the message box?
    I'm a MICKEY FAN

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I think the MessageBox is just an example, you can put what ever you want in the If statement
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5
    Junior Member
    Join Date
    Aug 2000
    Location
    Oslo, Norway
    Posts
    22
    Try this:

    Private Sub Command1_Click()
    SendKeys "{BACKSPACE}"
    End Sub

    Lars
    Lars Jarle Mæhlum
    http://www.touch-it.no

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width