Custom MsgBox using values from 2 different cells

T

Todd Huttenstine

I need to create a custom Message Box that has only an OK button.

On Sheet1 named Team Data, in cell X2 I have a Letter. This is a letter of
a Column.
On Sheet1 named Team Data, in cell W3 I have a Number.
The MsgBox will use the values in these 2 cells.

Assuming the value of cell X2 is "V" and the value of cell W3 is 5, I want
the MsgBox to say...
"Stat entered successfully into Column V."

then on next line of MsgBox I want it to use the value of cell W3. It
should say...
There are currently 5 remaining locations"

Thanx in advance
Todd Huttenstine
 
J

J.E. McGimpsey

one way:

With Sheets("Team Data")
MsgBox "Stat entered successfully into Column " & _
.Range("X2").Value & "." & vbNewLine & _
"There are currently " & .Range("W3").Value & _
" remaining locations"
End With
 
G

Gord Dibben

Todd

Sub message()
MsgBox "Stat entered successfully into Column " & Sheets _
("Team Data").Range("X2").Value & vbCrLf & _
vbCrLf & "There are currently " & Sheets _
("Team Data").Range("W3").Value & " remaining locations"
End Sub

Gord Dibben XL2002
 
T

Todd Huttenstine

thanx, worked like a charm
J.E. McGimpsey said:
one way:

With Sheets("Team Data")
MsgBox "Stat entered successfully into Column " & _
.Range("X2").Value & "." & vbNewLine & _
"There are currently " & .Range("W3").Value & _
" remaining locations"
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top