Message Box Reference Cell Text

Pinaceous

Well-known Member
Joined
Jun 11, 2014
Messages
1,113
Office Version
  1. 365
Platform
  1. Windows
Good Day,

I wanted to use a message box to reference a cell text.

For example,

VBA Code:
 MsgBox "Created! & Worksheets(1).Range("A27").Text &"

How do I use improvise this code to accept the text in Worksheet(1).Range("A27")?

Thank you!

Pinaceous
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You misplaced the closing double quote.

VBA Code:
MsgBox "Created! " & Worksheets(1).Range("A27").Text

Edit: Inserted a space after "Created!" for readability.
 
Upvote 0
Thanks Gokhan Aycan!

How about this version of the same question?

VBA Code:
 MsgBox "Created! & Worksheets(1).Range("A27").Text &", vbInformation, " ProtectUpdate."

Anyway to make this one work?
 
Upvote 0
You are putting the double quote at the wrong place. Otherwise that will work, yes.
 
Upvote 0

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

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