Most valuable professional
  • Hot Topics

Excel Can't figure out how to make the ActiveCell the same cell a Radio Button is in

I previously had my worksheet set up with 80 Radio Buttons. My Radio Buttons are in the same cell as the target data. I knew using 'Offset' in the macro to copy and paste the data (my data is dynamic) in the cell would be better, but I couldn't figure out how to do that so I used a specific cell reference (eg; C35) and when I selected the Radio Button in C35 it copied and pasted the data to the destination cell perfectly. But during the week i decided to alter my rows and now the corresponding code no longer aligns with the moved Radio Buttons and target cell. So now I'm back to trying to figure out the correct Offset code and I'm close, but still can't get it to work. Right now I have my data and the Radio Button in the same cell and this is the first part of the macro; Private Sub OptionButton1_Click() Dim OB As Variant OB = ActiveCell.Offset(,0).Select The rest of the code works (copies data in cell and pastes in destination cell). The only way I can get this code to work is to first select cell C35 then select the Radio Button. What i want is to just select the Radio Button and have it select the data in the same cell C35), but I can't figure out how to write the code to do this. the code right now makes the 'ActiveCell' the last cell I had selected. I think I've tried 20 different ways to do this and can't figure out what I'm doing wrong. Most VBA goes way over my head so please excuse my ignorance. Hopefully someone here knows what code I can use to grab the data in the same cell as the radio Button. Thanks to anyone that can help.

This question generated 10 answers. To proceed to the answers, click here.

This thread is current as of October 11, 2014.

For more resources for Microsoft Excel:

This article includes the following tags:

  • Excel
  • Microsoft Excel