How to get the active field?

DeepButi

New Member
Joined
Jul 14, 2015
Messages
41
Office Version
  1. 365
Platform
  1. Windows
I have a Form with several Text fields that go to a common code on TextBoxn_Change. How do I get the field that triggers the event so I can call the common routine with it?
 
It does if your controls are on a userform. If they they are on a sheet then there is no such thing as a Change event for FormControls.
So what exactly are you using?

Bingo!! You are right. It works on a Form.

Thanks a lot.
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I have a Form with several Text fields that go to a common code on TextBoxn_Change. How do I get the field that triggers the event so I can call the common routine with it?
Your OP said you were using a Form. That's why I my code was written that way.
 
Upvote 0

Forum statistics

Threads
1,215,420
Messages
6,124,803
Members
449,190
Latest member
cindykay

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