Reputation: 211
Hi currently I have a message box which helps me to show the names of projects when a macro button is being run. However, there is a problem as i do not know how to change the title of the message box into something else rather than "Microsoft Excel" title. Below is the image where the "Microsoft Excel" title is found and i would like to make changes on it:
This is the code that i have so far to produce such message box:
Private Sub Button()
Msg = "Name Of Projects:" & vbCr & "1.Establishing Global Research Alliances Phase 2" & vbCr & "2.Strengthening the Coordination of the MSG Program " & vbCr & "3.Support for Post-Private Sector and Small and Medium-Sized Enterprises Development Program Partnership Framework " & vbCr & "4.Communications Sector Reform" & vbCr & "5.Social Fund for Development Project " & vbCr & "6.Regional: Trade Finance Capacity Development" & vbCr & "7.Innovative Financing for Agriculture and Food Value Chains" & vbCr & "8. Financial and Legal Sector Technical Assistance Project"
MsgBox Prompt:=Msg
End Sub
Is there any codes i would need to add in so that the title of "Microsoft Excel" could be changed? Any help would be appreciated. Thank you.
Upvotes: 0
Views: 12414
Reputation: 1066
You can code like this.
Sub Msg_exe()
MsgBox "This is a message!", , "This is the Title"
End Sub
Check the link to learn more about message boxes in excel. Regards.
Upvotes: 1
Reputation:
There are more parameters to the MsgBox function. You can alter the buttons displayed, change the icon; even add a custom title.
MsgBox Prompt:=Msg, title:="My Titled MsgBox"
The [Optional] parameters are just that. Use them or don't use them but be aware of their existence.
Upvotes: 2