ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MessageBox Assistant (https://www.excelbanter.com/excel-programming/387693-messagebox-assistant.html)

SDH

MessageBox Assistant
 
Can someone please tell me why i get the number 1 at the end of my message
when the box pops up? Also, how would i change the title of the message Box
from saying "Microsoft Excel"?

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." & vbOK)
End Sub

timebird

MessageBox Assistant
 
vbOk is a constant variable and has a value of 1
you'd better modify MsgBox as following:

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." , vbOK, "Title")
End Sub
--
msn
---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"SDH" wrote:

Can someone please tell me why i get the number 1 at the end of my message
when the box pops up? Also, how would i change the title of the message Box
from saying "Microsoft Excel"?

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." & vbOK)
End Sub


SDH

MessageBox Assistant
 
thanks timebird, but now i get a compile error: Syntax Error with

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." , vbOK, "Name of
Club/Group")
End Sub

"timebird" wrote:

vbOk is a constant variable and has a value of 1
you'd better modify MsgBox as following:

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." , vbOK, "Title")
End Sub
--
msn
---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"SDH" wrote:

Can someone please tell me why i get the number 1 at the end of my message
when the box pops up? Also, how would i change the title of the message Box
from saying "Microsoft Excel"?

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." & vbOK)
End Sub


timebird

MessageBox Assistant
 
drop "(" and ")"
--
msn
---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"SDH" wrote:

thanks timebird, but now i get a compile error: Syntax Error with

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." , vbOK, "Name of
Club/Group")
End Sub

"timebird" wrote:

vbOk is a constant variable and has a value of 1
you'd better modify MsgBox as following:

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." , vbOK, "Title")
End Sub
--
msn

---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"SDH" wrote:

Can someone please tell me why i get the number 1 at the end of my message
when the box pops up? Also, how would i change the title of the message Box
from saying "Microsoft Excel"?

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." & vbOK)
End Sub


SDH

MessageBox Assistant
 
excellent, thanks very much timebird

"timebird" wrote:

drop "(" and ")"
--
msn
---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"SDH" wrote:

thanks timebird, but now i get a compile error: Syntax Error with

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." , vbOK, "Name of
Club/Group")
End Sub

"timebird" wrote:

vbOk is a constant variable and has a value of 1
you'd better modify MsgBox as following:

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." , vbOK, "Title")
End Sub
--
msn

---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"SDH" wrote:

Can someone please tell me why i get the number 1 at the end of my message
when the box pops up? Also, how would i change the title of the message Box
from saying "Microsoft Excel"?

Private Sub txtNameofGroup_Enter()
MsgBox ("Please enter the name of the Club/Group." & vbOK)
End Sub



All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com