Dear all
kindly iam facing a problem with listbox 14 coloumn getting its values from text boxes
suddenly code stops in line Nr# 10
file attached
My project - 2.xlsb
thanks in advance for your help
Dear all
kindly iam facing a problem with listbox 14 coloumn getting its values from text boxes
suddenly code stops in line Nr# 10
file attached
My project - 2.xlsb
thanks in advance for your help
Don't use .additem
Prepare an array first then assign it to the .list of the listbox:Sub CommandButton1_Click() ' Error Resume Next Dim arr1, i As Long Dim arr2(0 To 0, 0 To 13) arr1 = Array("tb10", "tb10", "TB0", "tb1", "cb1", "cb2", "tb5", "tb4", "tb10", "tb10", "tb10", "tb6", "tb7", "tb8") For i = 0 To UBound(arr1) arr2(0, i) = arr1(i) Next i ListBox1.List = arr2 '' For Each Ctrl In Me.Controls '' If TypeName(Ctrl) = "TextBox" Or TypeName(Ctrl) = "ComboBox" Then Ctrl.Value = "" '' Next Ctrl TB0.Value = Format(Worksheets("setup").Range("H2"), "MM/YYYY") End Sub
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
If you have sought help on this topic from other forums, you need (it's a rule) to supply links to those other threads. See http://www.excelguru.ca/content.php?184
Have you cross posted this question here: https://www.excelforum.com/excel-pro...ml#post5031904?
By the way, it's the same rule there too.
Hello P45Cal
than you very much for your help appreciate your support , sorry for cross posting
i will add it to my project and i look for your help if i face any problem
thanks
Marked As Solved
Hello P45Cal
when i try to add more data and press next it replace the old data with new data !!!
i need to add more data every time i press next till i press post all data in list box 1 move to worksheet("Database") thats it
can you help me please with both code
Thanks
any one can help ?
You have the array dimmed 0 to 13 which only allows 14 sets of data. Increase the Array to allow additional data
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
dear Aussiebear
i cant understand you
can you change the code and try , my problem is i need when i press Next , all data move to list box , and again when i press next , all data move to list box till finally when i press post all data move to work sheet "Database "
thanks
Please refer to the attachment. but "POST" has problems, there is no listobjects on sheets("DATABASE").
Dear 大灰狼1976
thanks for your help , next key is working thanks
post key code is not working i attached my tries to fix it , i deleted my tries and attached it again ,
thanks
Can you explain how to use tb10 data?
Will it be used in the formula?
The B/C/J columnS in the appendix is formula.
you are awesome , sure this columns has formula i set the Tb10 as test to test the list box with 14 column
if you please can make it auto evaluated or to keep it with formula as you like
i just set the tb10 as test not to be used
" now you understand my project all of it "
note
1- column L - the J.v Number it will be auto number ( max + 1 ) every " Journal voucher " - J.V - will be auto serial
2- column M will be " Yes " Or " No"
3- the reference number will be changed if you want to change the marker in to " To Be Allocated " and the values equal Zero then the reference will be ( Max + 1 ) - I Can Explain it Later
Really thanks
Hello Every Body