Hello,
I have several procedures that use the same Select Case statement to determine the option which the user selected.
I thought it might be a good idea or easier to create a public Select Case statement, so other procedures can call it instead of having 3 or 4 Select Case all over the place.
I have tried it, but couldn't figure out how to code the procedures that call it. It looks like I have to repeat the Case statement again in the Calling procedures, but this does not make sense.
What is the correct way to do it?
Thanks
Phucon
Public Sub ChKUsersSelection()
Select Case Options
Case 1
Enter…
Case 2
Edit…
Case 3
Delete…
Case 4
Open…
End Select
End Sub
Private Sub OK_Click()
Call ChkUsersSelection
Select Case Options
Case 1
Case 2
Case 3
Case 4
End Select
End Select
End Sub
Private Sub ButtonSetUp()
Call ChkUsersSelection
…
End Sub
Private Sub ListSetUp()
Call ChkUsersSelection
…
End Sub
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar