>>I think that your problem comes from the fact you pass the form's name to the sub instead of a reference to the object. Simply write :
>>
>>Sub FormCentr(Frm as Form) 'Frm is an object variable, passed by refernce
>> With Frm
>> .Top = X
>> .Left = Y
>> End With
>>End Sub
>>
>>
>>And call FormCentr Me 'Or any other form instance
>>
>>Hope it helps
>
>Okk thanks for your help with this issue, now I have tried this code in my forms
>and in the Load.event in one of them I code the call
>
>FormCentr (Form1)
>
>but then it comes back with a Type mismatch error. What Am I doing wrong??
>
>mark oliva
>
>@-- Of course the sub routine has been already define in the Module General
>@-- section
Hi,
try to declare the procedure like this:
Sub FormCentr(Frm as object)
I hope it works.
Vlad