VBA Code for Active X Button please :)

Grammarjunkie

Board Regular
Joined
Mar 22, 2016
Messages
86
I don't know if this is possible, but I bet it is! So basically I just want to embed an Active X button (which I got that far :P), when it's clicked, I want it to read through certain cells and return if any of them are blank.

So say the button will be on L2, and I want to be able to click it, and it run through all these cells, and any that are blank turn a light red.

The cells I want it to read through are all F:

41, 44:47, 50:51, 54:55, 58:61, 64:70, 73:80, 83:85, 88:96, 99:102, 105:112, 115:120, 123:125, 128:129



By no means go grossly out of your way to make this happen. If it's not simple, or impossible, just say so. Haha. It's not necessary. It would just be a nifty thing to have.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I set this up for the first 14 rows you can continue with all the rest if you want.
41, 44:47, 50:51, 54:55, 58:61 64 65
You should be able to read the code and see how it works.
Code:
Sub Turn_Me_Red()
Dim Del As Variant
Dim ss As Long
Del = Array("41", "44", "45", "46", "47", "50", "51", "54", "55", "58", "59", "60", "61", "64", "65")
ss = UBound(Del)

For i = 1 To ss
    If Cells(Del(i), 6).Value = Empty Then Cells(Del(i), 6).Interior.ColorIndex = 38
Next
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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