|
-
Jan 21st, 2002, 09:22 PM
#1
Thread Starter
Junior Member
How to use another forms subs
Hello - I've got a sub called addprefstocombo:
Public Sub addprefstocombo()
Dim alpayment As ArrayList = New ArrayList()
Dim s As String
'Load payment options into an array
alpayment = readtextfile("payment.ini")
'Clear out the combobox
Me.cboPayment.Items.Clear()
'Add them
For Each s In alpayment
Me.cboPayment.Items.Add(s)
Next
End Sub
This sub works perfectly when used inside its own form, but doesn't work (and completes without errors) when called from outside its form. I've tried saying:
Dim frm as New frmData
frm.addprefstocombo()
When calling it from another form but this doesn't work. It just completes, doesn't break, show errors, it just simply doesn't work. How do I call another form's subroutine? Thanks!
Reid
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
|