Hi I am wondering whether you could help me with an excel formulae.
zie below excel file
when I do a search and edit from results I get an error. Please help. Thanks.
With Best regard
Kirana
Hi I am wondering whether you could help me with an excel formulae.
zie below excel file
when I do a search and edit from results I get an error. Please help. Thanks.
With Best regard
Kirana
Hallo Kirana
Kind regards![]()
Private Sub ListBox1_Click() Dim say As Long, a As Byte, r As Long TextBox1 = ListBox1.List(ListBox1.ListIndex, 0) ComboBox2 = ListBox1.List(ListBox1.ListIndex, 1) For a = 3 To 12 Controls("textbox" & a) = ListBox1.List(ListBox1.ListIndex, a - 1) Next Sheets("Data").Range("A:A").Find(ListBox1.Text).Activate say = ActiveCell.Row Sheets("Data").Range("A" & say & ":M" & say).Select TextBox27 = ListBox1.ListIndex + 1 End Sub
Leo
Dear Leo,
Private sub listbox1_click() is working but I have one problem with :
Private Sub CommandButton5_Click() 'Search Button
Could you please check this for Me
thank you
There are a couple of things to do
In your Sub Back() routine, add Dim a as Long between the sub tittle and the For statement
Also, in your Private Sub CommandButton5_Click() routine, add Dim ctl as Control then replace
With![]()
For a = 1 To 13 ' Clear textboxes(1-12) Controls("textbox" & a) = "" Next
![]()
For Each ctl In Me.Controls Select Case TypeName(ctl) Case "TextBox" ctl.Value = "" Case "ComboBox", "ListBox" ctl.ListIndex = -1 End Select Next ctl
Last edited by gmr4evr1; 03-27-2016 at 02:34 PM. Reason: Fixed typo in For Each
1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.
Tom
Hello Kirana
in Sub CommandButton5 change this part
to![]()
For a = 1 To 13 ' Clear textboxes(1-12) Controls("textbox" & a) = "" Next
Kind regards![]()
TextBox1 = "" ComboBox2 = "" For a = 3 To 13 ' Clear textboxes(3-12) Controls("textbox" & a) = "" Next
Leo
Hello Leo
Thank you is working
well done
Kirana
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks