General information
Category:
Coding, syntax & commands
>>>Sub FormCentr(Frm as Form) 'Frm is an object variable, passed by refernce
>>> With Frm
>>> .Top = X
>>> .Left = Y
>>> End With
>>>End Sub
>>>
>Hi,
>try to declare the procedure like this:
>Sub FormCentr(Frm as object)
>I hope it works.
>Vlad
thank for your time and patients with me,, I change the declaration in the
sub to object now It reads the following:
Sub FormCentr(Frm As Object) 'Frm is an object variable, passed by refernce
Dim x As Integer, y As Integer
With Frm
.Top = (Screen.Height - .Height) / 2
.Left = (Screen.Width - .Width) / 2
End With
End Sub
Now It does not give me the Data type error but when It gets to the .TOP
operation to calculate the top distance to start doing the centering process
then It comes back with the following error
Object does not support Prop or event..
what do you thing I am doing wrong here??
mark oliva
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only