Error when clicking on listbox

josros60

Registered User.
Local time
Today, 01:39
Joined
Mar 10, 2011
Messages
73
i have customer database and got userform with listbox,

but every time open form and click a record on list box get the run time error,

could not find the specified object, and highlight this line (in red):

Code:
Private Sub ContactForm_Click()
Dim say As Long, a As Byte

For a = 0 To 11
'Controls("textbox" & a + 1) = ContactForm.Column(a)
[B][COLOR="Red"]Controls("textbox" & a + 1) = ContactForm.List(a)[/COLOR][/B]
Next

Sheets("ContactsInvoicing").Range("A:A").Find(ContactForm.Text).Activate
say = ActiveCell.Row
Sheets("ContactsInvoicing").Range("A" & say & ":L" & say).Select
TextBox15 = ContactForm.ListIndex + 1



End Sub

please help i have been looking for help for this error for awhile now and reponse. ( I am attaching the file)

thanks
 

Attachments

Try: Controls("textbox" & (a + 1)) = ContactForm.List(a)
 
Thank you.

but i tried get same error.
 
could please give a sample how do you use usually use Me.Controls(....

thanks
 
Code:
For a = 0 To 11
'Controls("textbox" & a + 1) = ContactForm.Column(a)
[B]Me.[/B]Controls("textbox" & (a + 1)) = ContactForm.List(a)
Next
 
Any help on this please, i tried all suggestions here and still getting same message, I attached the file, will that be easier to figure out by opening the file.

I will really appreciate any help, i have been trying for months and still not able, as I don't have that much knowledge in VBA.

thanks again.
 
Any help on this please, i tried all suggestions here and still getting same message, I attached the file, will that be easier to figure out by opening the file.

I will really appreciate any help, i have been trying for months and still not able, as I don't have that much knowledge in VBA.

thanks again.
File did not attach.
Compact and Repair the db and then zip it up. Use advanced posting and scroll down a bit to attach.
 
Are you planning to attach the MS Access db?
 

Users who are viewing this thread

Back
Top Bottom