Josh
Private Sub ListBox1_Click()
' Listbox1 array
Dim arrDocs(1 To 5)
arrDocs(1) = "Doc 1"
arrDocs(2) = "Doc 2"
arrDocs(3) = "Doc 3"
arrDocs(4) = "Doc 4"
arrDocs(5) = "Doc 5"
Dim Entrycount As Long
For Entrycount = 1 To 5
Worksheets("Sheet1").ListBox1.AddItem arrDocs(Entrycount)
Next
End Sub
That's how I do it. I might do it like this:
Dim arrDocs as Variant
Dim Entrycount as Long
arrDocs = Array("Doc 1","Doc 2","Doc 3","Doc 4","Doc 5")
For Entrycount = LBound(arrDocs) to UBound(arrDocs)
Worksheet("Sheet1").ListBox1.AddItem arrDocs(Entrycount)
Next Entrycount
If you add more docs later, it will be less work.
Here is how I get the data to the other sheet:
Private Sub Worksheet_activate()
Count = 0
For j = 0 To Worksheets("Sheet1").ListBox1.ListCount - 1
If Worksheets("Sheet1").ListBox1.Selected(j) = True Then
Count = Count + 1
With Worksheets("Sheet2")
.Columns(3).ClearContents
.Cells(Count + 15,3).Value =
Worksheets("Sheet1").ListBox1.List(j)
End With
This will delete and rewrite everything in column C. I'm not sure why your
using the Worksheet_Activate event. Which worksheet is it?