aspiringnerd
New Member
- Joined
- Apr 22, 2022
- Messages
- 39
- Office Version
- 365
- Platform
- Windows
I can use the following to reference a cell based on the location of the button
but can you do the opposite? I want to reference a button based on the active cell.
ie if I have cell a1 selected then I want to reference button 1, and if I have a2 selected then I want to reference button 2 (assuming each row gets a button)
VBA Code:
ActiveSheet.Buttons(Application.Caller).TopLeftCell.Select
but can you do the opposite? I want to reference a button based on the active cell.
ie if I have cell a1 selected then I want to reference button 1, and if I have a2 selected then I want to reference button 2 (assuming each row gets a button)