Actions based on an activated cell

USAMax

Well-known Member
Joined
May 31, 2006
Messages
843
Office Version
  1. 365
Platform
  1. Windows
I built a function that will pull options from the imported data. Cell B2 will always have the first option box and if there are 25 options they will continue down to B26. The next set of options will be from F2 to F26 then columns J and N depending on how many options there are.

First: How do I tie a routine to the cell that. Once the cell is selected or activated the routine needs to run.
Second: What is a good check mark to place in the cell to show that that option is active.

I am not using a User Forms or Check Boxes because this sheet has to be dynamic. The content will keep changing.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I found a way to do what I want but I have to Double Click.

Everyone has always been amazing in the past so I do not need to take up anyone's time.


Private Sub worksheet_beforedoubleclick(ByVal Target As Range, Cancel As Boolean)
Set Target = ActiveCell
ActiveCell.Select
Cancel = True
If ActiveCell.FormulaR1C1 = "" Then
ActiveCell.FormulaR1C1 = "ü"
Else
ActiveCell.FormulaR1C1 = ""
End If
Call Prep(Target, Cancel)
End Sub

Thank you,
 
Upvote 0

Forum statistics

Threads
1,214,407
Messages
6,119,332
Members
448,888
Latest member
Arle8907

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