Inserting table into MsgBox

dmorse03

Board Regular
Joined
Sep 7, 2002
Messages
59
I have a table which occupies

D10..e18

How do I display this table in a MsgBox or an InputBox?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You could try something like this (you don't really need the set command, btw, but it might be easier to amend and debug with it in): -

Code:
Public Sub ShowTable()

Dim myData
Dim myStr As String
Dim x As Integer
Dim myRange As Range

Set myRange = Range("D10:E18")

myData = myRange.Value

For x = 1 To UBound(myData, 1)
    myStr = myStr & myData(x, 1) & vbTab & myData(x, 2) & vbCrLf
Next x

MsgBox myStr

End Sub
 
Upvote 0
Hello everyone,

How can I insert a table(A1:I31) into msgbox when the excel file containing the table is CLOSED ? And I dont want to open the file.

If it's not possible by not opening, when i click for msgbox, the program can open the excel file (C:\table1.exe --> Fixed adress always) and then close.
 
Upvote 0

Forum statistics

Threads
1,219,035
Messages
6,145,902
Members
450,654
Latest member
lorento

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