gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
Compile Error:
Can't find Project or Library
Sub Userform_Button()
Dim Msg As String
Dim i As Integer
Dim NextRow As Long
Worksheets("Tables").Select
Range("L1").Select
' Determine the next empty row
NextRow = Application.WorksheetFunction. _
CountA(Range("L:L")) + 1
' Transfer the selected items from ListBox
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
c = c + 1
Cells(LastRow + c, 12) = ListBox1.List(i, 0)
End If
Next i
End Sub
It is selecting teh second "c" inthe second row above End If. I dont know what the problem is? Thanks!
Can't find Project or Library
Sub Userform_Button()
Dim Msg As String
Dim i As Integer
Dim NextRow As Long
Worksheets("Tables").Select
Range("L1").Select
' Determine the next empty row
NextRow = Application.WorksheetFunction. _
CountA(Range("L:L")) + 1
' Transfer the selected items from ListBox
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
c = c + 1
Cells(LastRow + c, 12) = ListBox1.List(i, 0)
End If
Next i
End Sub
It is selecting teh second "c" inthe second row above End If. I dont know what the problem is? Thanks!