See code below:
I have a list box, named cboSecondary which is in Sheet "combo".
non of this is actuall yin a form.
> Sub Update_task_part()
> ' This macro adds the tasks picked in the List Box and adds them to th
[quoted text clipped - 27 lines]
>
> End Su
--
Ctec
Tom Ogilvy - 21 Mar 2006 15:33 GMT
This worked for me. I assume cboSecondary is a LISTBOX (not a combobox) with
the multiselect property set to True
Sub Update_task_part()
' This macro adds the tasks picked in the List Box and adds them to the
' Tasks revenue part of the form
' Created by Christian Simonsen 21/03/06
Dim mRows As Long
Dim i As Long
Dim Msg As String
' hides/unhides the required rows depending on the number of tasks
' picked
mRows = 0
With cboSecondary
For i = 0 To .ListCount - 1
If .Selected(i) Then mRows = mRows + 1
Next
End With
Range("list_rev").EntireRow.Hidden = False
mRows = 10 - mRows + 1
Range("list_rev").Rows("" & _
mRows & ":10").EntireRow.Hidden = True
' Gets the task numbers for the rows
With cboSecondary
For i = 0 To .ListCount - 1
If .Selected(i) Then
Msg = Msg & .List(i) & vbCrLf
End If
Next i
End With
If Len(Msg) = 0 Then
Msg = "No items selected"
Else
MsgBox Msg
End If
End Sub

Signature
Regards,
Tom Ogilvy
> See code below:
>
[quoted text clipped - 32 lines]
> >
> > End Sub
Ctech - 21 Mar 2006 15:41 GMT
Im still getting the same error "424, Object required"..
--
Ctec
Ctech - 21 Mar 2006 15:42 GMT
Im still getting the same error "424, Object required"..
--
Ctec
Ctech - 21 Mar 2006 18:28 GMT
Should I try to export the workbook to another computer and thest i
there
--
Ctec