User Profile

Collapse

Profile Sidebar

Collapse
jiexian
jiexian
Last Activity: May 18 '09, 04:15 PM
Joined: May 15 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jiexian
    started a topic Please help me with addition to variable

    Please help me with addition to variable

    Please teach me how to do this the right way in vb6 or vb08. (preferbably vb6)

    What i want is to increase the value of Text1.text by 1 every time i click it. But with this code, Text1.text remains as 1 so matter how many times i click it.

    Code:
    Private Sub Form_Load()
     Dim cap As Integer
    cap = Val(Text1.Text)
    End Sub
    Code:
    Private Sub Command1_Click()
    cap = cap + 1
    Text1.Text
    ...
    See more | Go to post

  • jiexian
    started a topic How To set a a Function Key to click a cmd?

    How To set a a Function Key to click a cmd?

    This is what i have

    Code:
    Public Sub Form_Load()
     KeyPreview = True
    End Sub
    Code:
    Private Sub Form_KeyDown(KeyCodeConstants As Integer, Shift As Integer)
    KeyPreview = True
     If KeyCodeConstants = vbKeyF1 Then cmd1_Click
     If KeyCodeConstants = vbKeyF2 Then cmd2_Click
    End Sub
    When i press F1 or F2, i get an error msg "Compile error : Sub or Function not defined"
    ...
    See more | Go to post
No activity results to display
Show More
Working...