Value of a cell

Foo_Man_Chu

Board Regular
Joined
Jul 22, 2010
Messages
79
Hi All,

I've got a cell that contains a button. When the button is clicked, I need to reference the value of the cell next to the cell that contains the button that was clicked. I know this is probably super simple but I can't seem to get it. Any help will be greatly appreciated. Thanks!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
where do you need to reference the cell

use its value, copy it somewhere, add it to a calculation ?

does the cell move

is it always numeric or text or mixed
 
Upvote 0
The button is a delete button, and it deletes the row that it is located on. What I want to do is take the text value of the cell next to the cell the button is located on and use that value in a message box that says "Are you sure you want to delete " & the text in the cell next to the button's cell. The cell should always be next to the cell containing the delete button for that row. The type of data in the cell next to the button cell should be treated as text.
 
Upvote 0
Ok, here is code that I came up with to give me what I need. If there is a simpler way of doing it, I'd love to see it to make my code better, thanks!

Cells(ActiveSheet.Buttons(Application.Caller).TopLeftCell.Row, ActiveSheet.Buttons(Application.Caller).TopLeftCell.Column + 1).Value
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

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