Would be easier to help if you can provide the file on which you are trying
this macro

On Sat, Feb 21, 2009 at 11:04 PM, Carlita <[email protected]>wrote:

>
> i would like to create a loop (do while) in order to copy paste
> different name from a list box and write it on a database on different
> rows. (one name for one row) the key for each row is already linked to
> the names .i am able to do it for the first name selected in the
> listbox but i need to repaet it.  here is the vba:
> rivate Sub CommandButton1_Click()
>
> Worksheets("data base").Select
> Range("A65536").End(xlUp).Offset(1, 0).Select
> Selection.Value = Worksheets("parameters").Range("a1").Value
>
>
> 'Cells(ActiveCell.row, Range("name").Column) = Record.ListBox1.Value
> Dim i As Integer
> For i = 0 To Record.ListBox1.ListCount - 1
> Do
>    ???????????
> Loop While Record.ListBox1.Selected(i)
>
>    If Record.ListBox1.Selected(i) Then
>        Cells(ActiveCell.row, Range("training").Column) =
> Record.ComboBox1.Value
>        Cells(ActiveCell.row, Range("Date").Column) =
> Record.ComboBox5.Value
>        Cells(ActiveCell.row, Range("Length").Column) =
> Record.ComboBox3.Value
>        Cells(ActiveCell.row, Range("name").Column) =
> Record.ListBox1.List(i)
>
>    End If
>
> thanks !!!
>
> >
>


-- 
Thanks & Regards,

Harmeet Singh

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to [email protected]
If you find any spam message in the group, please send an email to:
Ayush Jain  @ [email protected] or
Ashish Jain @ [email protected]
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to