View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris Salcedo Chris  Salcedo is offline
external usenet poster
 
Posts: 25
Default list box question

I now have a populated list box on my form. I now need to take each
value (its the name of a named range) and copy that range to another
sheet...


How do I create the loop ??????

On Error Resume Next
Sheets(Me.DestTextBox.Text).Delete

Sheets.Add
ActiveSheet.Name = Me.DestTextBox.Text 'my sheet

The "somehow read the RightListBox starting with the first entry"
Loop

Set lastcell = Cells.SpecialCells(xlLastCell)' find the last
mrows = lastcell.Row ' used row

Set rng = the first item in the list

rng.Copy Destination:=Worksheets(Me.DestTextBox.Text).Range ("A" &
(mrows + 1))

Next entry

Any ideas ??????

Thanks

Chris