Table of information in msgbox - EXCEL VBA

mbsalim

New Member
Joined
Jan 20, 2015
Messages
16
Hello helpful lot!,

So I have an excel sheet heavily 'macroed' and coded but need to insert a message box for when a particular worksheet is opened. there are two issues/questions;

1) How do I format the message box so it is over 3/4 lines and not one long text.

2) Within the message box I want to insert a table of information which is located on a hidden sheet (labelled SYS_Fee)

so far I have;

Private Sub Workbook_Open()

Dim msg As Long

msg = MsgBox("message", vbOKOnly, "Fee Disclaimer")


End Sub

What i would like is;

Private Sub Workbook_Open()

Dim msg As Long

msg = MsgBox("message blah blah blah:

table of information", vbOKOnly, "Fee Disclaimer")


End Sub

Thank you soooo much for your help in advance!!!!!!!!!!!!!!!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
The first argument for Msgbox would need to be a "concatenation" of values.
For example:
Code:
Msgbox "line 1" & vbcrlf & "line 2" & _
vbcrlf & "line 3" & vbcrlf & "line 4"
You could then add your table of information, one line at a time (you can also use "vbtab" for tabulation) but make sure that you do not have too many lines - you will want the message box to fit on the screen,
 
Upvote 0

Forum statistics

Threads
1,223,317
Messages
6,171,419
Members
452,402
Latest member
siduslevis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top