Click to See Complete Forum and Search --> : MsgBoxs
candekissez
May 13th, 2001, 01:50 PM
How can I make a msgbox multiline?
like write something on one line and
another on the next...?...
Smile - somewhere its helping someone.
d.paulson
May 13th, 2001, 02:20 PM
MsgBox "this is line one" & vbNewLine & "this is line 2"
David Paulson
candekissez
May 13th, 2001, 02:29 PM
thank you sooooo much! is there a way to center text on a msgbox also?
Smile - somewhere its helping someone.
d.paulson
May 13th, 2001, 03:01 PM
I whipped up a function for you
option Explicit
private Sub Form_Load()
MsgBox CenterString("this is line one") & vbNewLine & CenterString("this is line 2")
End Sub
public Function CenterString(str as string) as string
str = Space((25 - len(str)) / 2) & str & Space((25 - len(str)) / 2)
CenterString = str
End Function
David Paulson
candekissez
May 13th, 2001, 03:26 PM
thank you VERY much for ur help
honestly tho, i dont think i will be able to use that because I havta do this proj for a school proj and im not sure we're allowed to use things we havent learned about and we havent learned about "Public ..." stuff....
But thank you ever so much!!!
Smile - somewhere its helping someone.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.