Hi,

im trying to make a small vba application in excell to manage all of my compagny's finances. I just got started, i only got 2 user forms up to now, the first form lists all clients and the second one will show all the informations on the client selected in the first form. When i load the next form, everything is sweet, but when i started putting code in the UserForm_Initialize() method, i started to get runtime error 91 Object variable or with block not set. Ill post the code that i think is relevant and i would really appreciate some of ur help.

in the first form
Private Sub cmdSuivant_Click()
paramClient = Mid(lstClients, 1, InStr(1, lstClients, " ", vbTextCompare))

Unload Me
Load frmClient
frmClient.Show
End Sub

in the second form
Private Sub UserForm_Initialize()
Dim lign As Integer
Dim lRange As Range

Set lRange = Sheet4.Range("A4:A500")

lign = lRange.Find(paramClient).row
msgbox lign
End Sub

in a module
Public paramClient As String

i think the error is related to the lign = lRange.Find(paramClient).row because if i put it in comment, everything is nice.

I would really appreciate ur help
Thanks