That's not *quite* true when considering variables. When you make a call to
a subroutine with parenthesis the value passed is passed ByVal, rather than
ByRef, regardless of the variable declaration in the called procedure.
MVP Visual Basic
Please respond only to the newsgroups so all can benefit.
: > IS this how I call it under the Formload of the particular form that I
: > to centralise?
: > MySize (FrmLogin)
: > FrmLogin is the name of my form...
: > Anything wrong?
: > I got Type mismatch...pointing to the line above..
: When you make a call to a Subroutine without using the Call keyword, you
: should not use parentheses. If parentheses that are not part of the
: syntax are used, VB treats it as an expression to be evaluated. In the
: of an object, it evaluates to its default property. I don't remember what
: the default property of a form is, it may be another object
: in which case I think that object's default property is used); but, in any
: case, passing the form's name in parentheses does not pass the form
: Remove the parentheses (and remember never to add them anywhere in VB just
: because you think they look good) and the function should work fine.
: Rick - MVP