VBA to hide just one just 3 cells ?

aedctalk

Board Regular
Joined
Oct 9, 2010
Messages
156
Hi. Ok. I have a tracker for our job. However there is a part of the tracker that we only need 3 months of every year. called "stars of hope"

I'd like make it so that when a checkbox is checked YES (meaning show stars of hope)..

That these two cells will show up from being hidden.

I have the formula below i'm using to hide rows.. however i cannot hide rows for these. I need all the other cells in the rows and columns to show up.

Is there a way to hide just a cell? I'd be fine with making it invisible TO.. Is it posible to remove borders, background color, and change text color.. using vba?

anyway here is what i'im using for rows. Anyway to format the cell colors/borders or hide just the cell?

ActiveSheet.Unprotect
Dim cb As Excel.CheckBox

Set cb = Excel.ActiveSheet.CheckBoxes(Application.Caller)
If cb.Value = xlOn Then
Rows("107:108").EntireRow.Hidden = False
Else
Rows("107:108").EntireRow.Hidden = True
End If
ActiveSheet.Protect


say instead of hiding i just wanted to turn the cell completely white? is that easier? how to?

THANK YOU!!!
 
Last edited:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
You can set its .Font.Color to vbWhite to hide it and vbBlack (or vbRed or whatever) to reshow it.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,287
Members
452,902
Latest member
Knuddeluff

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