Run macro when click on cell rather than value change

Kamolga

Well-known Member
Joined
Jan 28, 2015
Messages
1,185
Hi,

I have a pretty long macro running when changes are made to a group of dropdown menu (if the user change value, put the same or delete the value), using

Code:
[TABLE="width: 588"]
<tbody>[TR]
  [TD="class: xl63, width: 588"]Private  Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells as Range
Set KeyCells = Range(Whatever)
[TABLE="width: 588"]
<colgroup><col></colgroup><tbody>[TR]
[TD]    If Not Application.Intersect(KeyCells, Range(Target.Address)) _[/TD]
[/TR]
[TR]
[TD]           Is Nothing Then[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[/TR]
</tbody>[/TABLE]

What I would like is to run a first macro (simple zoom) when click on the cell, before selecting value. I hope I am clear. Is it possible?

Thank you in advance for your help
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
You can use a SelectionChange event:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim KeyCells As Range
Set KeyCells = Range(Whatever)
    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then
 
Upvote 0
Thank you very much!
There was no way to increase font of dropdown menu and no way to read the menus at 60% zoom. This work-around works perfectly
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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