|
-
Jul 31st, 2000, 07:00 AM
#1
Thread Starter
New Member
Hi. I'm creating trying to create an Active-X control for one of my projects. The purpose of the control is to place a combobox on the form, and allow the user to select from a list of states within Australia. However, it is not really working properly. While the values in the combobox show up just fine and can be selected, I can't seem to grab the selected value out of the control itself. Can someone please help? TIA. The coding is shown below.
Option Explicit
Public Event Click()
Public Event Change()
Private Sub cboState_Change()
RaiseEvent Change
End Sub
Private Sub cboState_Click()
RaiseEvent Click
End Sub
Private Sub UserControl_Initialize()
With cboState
.AddItem ("N/A") 'Not Applicable
.AddItem ("NSW") 'New South Wales
.AddItem ("NT") 'Northern Territory
.AddItem ("QLD") 'Queensland
.AddItem ("SA") 'Southern Australia
.AddItem ("TAS") 'Tasmania
.AddItem ("VIC") 'Victoria
.AddItem ("WA") 'Western Australia
End With
End Sub
Public Property Get Text() As String
Text = cboState.Text
End Property
Public Property Let Text(ByVal New_Text As String)
PropertyChanged "Text"
End Property
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
|