|
-
Jul 6th, 2000, 04:15 PM
#1
Thread Starter
Member
Ok, here's the dispute, a collegue of mine and I disagree on whether or not it is poor programming style to call an event procedure from other procedures. The following is a simple example:
Corbin's Way!
--------------------
Dim intX As Integer
Private Sub Command1_Click()
intX = intX + 1
Text1.Text = intX
End Sub
Private Sub Form_Click()
Command1_Click
End Sub
Private Sub Form_Load()
intX = 0
End Sub
Eli's Way!
------------------------
Dim intX As Integer
Private Sub Command1_Click()
Increment
End Sub
Private Sub Form_Click()
Increment
End Sub
Private Sub Form_Load()
intX = 0
End Sub
Private Sub Increment()
intX = intX + 1
Text1.Text = intX
End Sub
Your comments will be greatly appreciated. Please be clear on who's code you would prefer and why. Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|