Forum

TURNING HIGHLIGHTED...
 
Notifications
Clear all

TURNING HIGHLIGHTED SQUARES ON/OFF

7 Posts
3 Users
0 Reactions
53 Views
(@wansley92)
Posts: 4
Active Member
Topic starter
 

Hello,

I'm trying to figure out a way to toggle the highlighted squares on and off. I have a macro that I saw online but it's not working. I've attached the file that I'm working on. 

Can you see if the Macro that i'm using is wrong some how?

Thank you in advance.

 

Wans

 
Posted : 12/06/2020 3:40 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Wansley,

Welcome to our forum!

You haven't attached your file or code, so I can't check it. However, if you want to toggle highlighting of cells on/off, you can use Conditional Formatting for this as explained here.

Mynda

 
Posted : 12/06/2020 7:06 pm
(@wansley92)
Posts: 4
Active Member
Topic starter
 

Hello Mynda,

Sorry about that. I've attached it now. Let me know if you see anything wrong with the code. 

 
Posted : 13/06/2020 8:58 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Wansley,

You have code in the workbook which is not mine:

Private Sub Workbook_Open()

   If GetCodeSetting("CodeSetting") = False Then Exit Sub
   SetCodeSetting "CodeSetting", True

End Sub

The line in red is generating an error because it's expecting a Boolean (False or True) value but it's calling a Sub that returns a string.

If I comment out that line the code works as it should.

There are a number of Subs and Functions in the workbook that I am not familiar with (I did not write them) so I don't know if you intend for them to be used or not?

If you don't need them I can get rid of them and get the code working for you.

Regards

Phil

 
Posted : 13/06/2020 9:13 am
(@wansley92)
Posts: 4
Active Member
Topic starter
 

Hello Phil,

I don't mind them being removed as long as i'm able to disable and enable the macro. 

Thank you in advance.

 

Best,

Wans

 
Posted : 13/06/2020 2:52 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Wansley,

Please see attached.

Do you want to be able to turn off highlighting on a per sheet basis or for the whole workbook at certain times?

Regards

Phil

 
Posted : 19/06/2020 8:24 pm
(@wansley92)
Posts: 4
Active Member
Topic starter
 

Hi Phil,

I would like to be able to turn it off/on for the whole workbook.

 

Best,

Wans

 
Posted : 24/06/2020 11:04 am
Share: