![]() |
Data from cell viewed in message box
Hello all,
Anyone know how to take data from any give cell(s) and place in a message box? I have 2 cells (J9 and J19) and i want this data in the message box. Dim ans As Long ans = MsgBox("Supervisor Name: (CELL VALUE J19) & Agent Name: (Cell VALUE J9). Is this correct?", vbYesNo + vbQuestion) Thx in advance!!! |
Data from cell viewed in message box
hi
this works in 03 Sub messinbot() Dim ans As Long Dim r As String Dim s As String r = Range("J19").Value s = Range("J9").Value ans = MsgBox("Supervisor Name: " & r & " & Agent Name: " & s & _ ". Is this correct?", vbYesNo + vbQuestion) End Sub regards FSt1 "Peruanos72" wrote: Hello all, Anyone know how to take data from any give cell(s) and place in a message box? I have 2 cells (J9 and J19) and i want this data in the message box. Dim ans As Long ans = MsgBox("Supervisor Name: (CELL VALUE J19) & Agent Name: (Cell VALUE J9). Is this correct?", vbYesNo + vbQuestion) Thx in advance!!! |
Data from cell viewed in message box
On Mar 13, 6:24*pm, FSt1 wrote:
hi this works in 03 Sub messinbot() Dim ans As Long Dim r As String Dim s As String r = Range("J19").Value s = Range("J9").Value ans = MsgBox("Supervisor Name: " & r & " & Agent Name: " & s & _ * * ". Is this correct?", vbYesNo + vbQuestion) End Sub regards FSt1 "Peruanos72" wrote: Hello all, Anyone know how to take data from any give cell(s) and place in a message box? I have 2 cells (J9 and J19) and i want this data in the message box. Dim ans As Long ans = MsgBox("Supervisor Name: (CELL VALUE J19) & Agent Name: (Cell VALUE J9). Is this correct?", vbYesNo + vbQuestion) Thx in advance!!! Something needs to happen when you select yes or no Sub messinbot() Dim ans As Long Dim r As String Dim s As String r = Range("J19").Value s = Range("J9").Value ans = MsgBox("Supervisor Name: " & r & " & Agent Name: " & s & _ ". Is this correct?", vbYesNo + vbQuestion) If ans = vbYes Then MsgBox "You selected Yes" If ans = vbNo Then MsgBox "You selected no" End Sub |
Data from cell viewed in message box
That did it. Thanks!!!
"FSt1" wrote: hi this works in 03 Sub messinbot() Dim ans As Long Dim r As String Dim s As String r = Range("J19").Value s = Range("J9").Value ans = MsgBox("Supervisor Name: " & r & " & Agent Name: " & s & _ ". Is this correct?", vbYesNo + vbQuestion) End Sub regards FSt1 "Peruanos72" wrote: Hello all, Anyone know how to take data from any give cell(s) and place in a message box? I have 2 cells (J9 and J19) and i want this data in the message box. Dim ans As Long ans = MsgBox("Supervisor Name: (CELL VALUE J19) & Agent Name: (Cell VALUE J9). Is this correct?", vbYesNo + vbQuestion) Thx in advance!!! |
Data from cell viewed in message box
Thanks Curly. I've got actions for the yes no answers.
"CurlyDave" wrote: On Mar 13, 6:24 pm, FSt1 wrote: hi this works in 03 Sub messinbot() Dim ans As Long Dim r As String Dim s As String r = Range("J19").Value s = Range("J9").Value ans = MsgBox("Supervisor Name: " & r & " & Agent Name: " & s & _ ". Is this correct?", vbYesNo + vbQuestion) End Sub regards FSt1 "Peruanos72" wrote: Hello all, Anyone know how to take data from any give cell(s) and place in a message box? I have 2 cells (J9 and J19) and i want this data in the message box. Dim ans As Long ans = MsgBox("Supervisor Name: (CELL VALUE J19) & Agent Name: (Cell VALUE J9). Is this correct?", vbYesNo + vbQuestion) Thx in advance!!! Something needs to happen when you select yes or no Sub messinbot() Dim ans As Long Dim r As String Dim s As String r = Range("J19").Value s = Range("J9").Value ans = MsgBox("Supervisor Name: " & r & " & Agent Name: " & s & _ ". Is this correct?", vbYesNo + vbQuestion) If ans = vbYes Then MsgBox "You selected Yes" If ans = vbNo Then MsgBox "You selected no" End Sub |
All times are GMT +1. The time now is 03:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com