Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, Hope you can help me here and that I'm not trying to do th impossible. I have a major module that I'm working on where the user inputs dat into the form this data includes: product state start date end date deal rate total amount I have 2 forms - one where the data is entered and the other where i is reviewed(i was thinking of a listbox for the second) The user puts in one product and the form transfers the data to th different cells in the spreadsheet, and then the form is made blank an the user can enter another product. What I want is a middle / review section where the data is transfere to a listbox so the user can double check the data. If the user woul like to make changes they can click the line and will be returned t the original form and the variables to that product line will be show and can be edited. When the review data as ok, teh user presses a button and then the dat is transfered to the spreadsheet line by line. I hope this makes sense and someone can help me as I am really stuc and I am trying to get this finished asap. THANK YOU AL -- Sami8 ----------------------------------------------------------------------- Sami82's Profile: http://www.excelforum.com/member.php...fo&userid=2711 View this thread: http://www.excelforum.com/showthread.php?threadid=47199 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sami82,
Try this code below cut and paste to a userform with 2 listbox and 2 commandbuttons. See if this code helps you attaining what you want. Hope this helps. Private Sub CommandButton1_Click() If Lb1.ListIndex = 0 Then Lb2.AddItem Lb1.Text Lb1.RemoveItem Lb1.ListIndex End If End Sub Private Sub CommandButton2_Click() Do While Lb1.ListCount 0 Lb2.AddItem Lb1.List(0) Lb1.RemoveItem (0) Loop End Sub Private Sub UserForm_Activate() UserForm1.Caption = "Use of Listbox" CommandButton1.Caption = "Transfer to Listbox 2" CommandButton2.Caption = "Transfer All" With Lb1 ..AddItem Cells(1, 1).Value ..AddItem Cells(2, 1).Value ..AddItem Cells(3, 1).Value ..AddItem "Darryl" ..AddItem "Dom" ..AddItem "Donna" ..AddItem "Debra" ..AddItem "Dan" ..AddItem "Dieter" End With End Sub Note: Try to put a value name for Cells(1,1).Value, Cells(2,1).Value etc. "Sami82" wrote: Hi All, Hope you can help me here and that I'm not trying to do the impossible. I have a major module that I'm working on where the user inputs data into the form this data includes: product state start date end date deal rate total amount I have 2 forms - one where the data is entered and the other where it is reviewed(i was thinking of a listbox for the second) The user puts in one product and the form transfers the data to the different cells in the spreadsheet, and then the form is made blank and the user can enter another product. What I want is a middle / review section where the data is transfered to a listbox so the user can double check the data. If the user would like to make changes they can click the line and will be returned to the original form and the variables to that product line will be shown and can be edited. When the review data as ok, teh user presses a button and then the data is transfered to the spreadsheet line by line. I hope this makes sense and someone can help me as I am really stuck and I am trying to get this finished asap. THANK YOU ALL -- Sami82 ------------------------------------------------------------------------ Sami82's Profile: http://www.excelforum.com/member.php...o&userid=27111 View this thread: http://www.excelforum.com/showthread...hreadid=471995 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
Setting up a form to input into selected worksheet | Excel Discussion (Misc queries) | |||
Budget input form/worksheet | New Users to Excel | |||
Employee review form | Excel Worksheet Functions | |||
Input Form on Worksheet 1, Data on Worksheet 2 | Excel Programming |