VBA Code Behind Button For Single Record/Form Conditioning

outlook

Board Regular
Joined
Jun 16, 2010
Messages
93
Hi All,

I have a button which appears on each record of a form. I want the user to be able to click on it, and then it colours the data within the form using conditional formatting.

The only problem is that the current VBA code I have, colours every record, and not the current one.

Can anyone suggest some code for me?

I can paste my code on here if it will help.

Thank you.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Thank you for your reply, but that link doesn't really help me.

Here is my VBA event code:

Private Sub Check_Completed_Click()
Me.[INTRO FEE %].BackColor = 68004
Me.[INTRO FEE £].BackColor = 68004
Me.[REDUCTION £].BackColor = 68004
End Sub

The button that actions this code is on the form, but when pressed it colours every record, not just the current one.

Maybe the code is wrong, but I'm not sure how to change it.

Please help!!!
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,855
Members
452,948
Latest member
UsmanAli786

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