A method to reposition standard MsgBox windows from VB
Posted
by Aaron Young
on February 7th, 2004
The new routine has the following Format:
'
public Function MsgBoxEx(Prompt, optional X = -1, optional Y = -1, _
optional StartupPosition as StartupPos = CenterScreen, _
optional Buttons as VbMsgBoxStyle = vbOKOnly, optional Title, _
optional HelpFile, optional Context) as VbMsgBoxResult
'
'
You can specify the startup x and y positions or even whether the message box is centered to the screen or the calling form.

Comments
Good
Posted by Legacy on 05/22/2002 12:00amOriginally posted by: George
Well not for experts but for newbies
ReplySuggestion on the order of the parameters
Posted by Legacy on 04/25/2000 12:00amOriginally posted by: Anonymous
This is quite useful and handy. It's just a small thing but it is probably better to define the signature as follows:
MsgBoxEx(Prompt, Optional Buttons As VbMsgBoxStyle = vbOKOnly, Optional Title, Optional HelpFile, Optional context, Optional StartupPosition As StartupPos = CenterScreen, Optional x = -1, Optional Y = -1) As VbMsgBoxResult
Regards
Reply