Display Active Cell Values in MsgBox

f00dFights

New Member
Joined
Jul 12, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
This is one that has stumpted me for a while but can anyone tell me how to display an Active Row in a message box?
I have a table with three columns and when i select one cell i need to return the row values in a MsgBox (so for instance if i select A7; it should return A7, B7 and C7)

Id appreciate any help
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This code in sheet code
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    With ActiveCell
        MsgBox .Value & "/" & .Offset(, 1) & "/" & .Offset(, 2)
    End With
End Sub
DoubleClick the Cell
 
Upvote 0
This code in sheet code
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    With ActiveCell
        MsgBox .Value & "/" & .Offset(, 1) & "/" & .Offset(, 2)
    End With
End Sub
DoubleClick the Cell
Hi,
i forgot to mention the data is being pulled into a listbox via RowSource. I tried your suggestion in the relevant sheet and the image is the output
 

Attachments

  • Capture.PNG
    Capture.PNG
    8.5 KB · Views: 8
Upvote 0

Forum statistics

Threads
1,214,999
Messages
6,122,645
Members
449,093
Latest member
Ahmad123098

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