balumail75
06-01-2013, 09:50 PM
Hi,
I created a sub with 5 parameters. In that 4 are optional parameters.
But if I pass the 2nd argument and leave next 3 arguments empty.
the last argument is allowing for empty argument. If I press space for the last one, it autoaligns and deletes the space, and gives the error message "Complie Error: Expected: expression"
the sub is -
Public Sub PositionandResize(shp As Shape, Optional sgTop As Single, Optional sgLeft As Single, Optional sgHeight As Single, Optional sgWidth As Single)
pass the arguments -
PositionandResize .Shapes(1), 115.4286, , ,
Please help for passing the last as empty argument.
Thanks for your help,
Balumail75.
I created a sub with 5 parameters. In that 4 are optional parameters.
But if I pass the 2nd argument and leave next 3 arguments empty.
the last argument is allowing for empty argument. If I press space for the last one, it autoaligns and deletes the space, and gives the error message "Complie Error: Expected: expression"
the sub is -
Public Sub PositionandResize(shp As Shape, Optional sgTop As Single, Optional sgLeft As Single, Optional sgHeight As Single, Optional sgWidth As Single)
pass the arguments -
PositionandResize .Shapes(1), 115.4286, , ,
Please help for passing the last as empty argument.
Thanks for your help,
Balumail75.