Forum Discussion

Mike Tagg's avatar
Mike Tagg
Copper Contributor
Dec 10, 2017

Highlight a cell

Greetings all,  

A complete ignoramus here! Please, can anyone advise?

The situation is this, I am working on a MacBook 13" with Microsoft Office 2016. I have just taken over as treasurer of our little club. I have a workbook of just six pages with names scattered all over them. 

I want to find all the occurrences of the name "Smith" so I put it in the search box and no problems EXCEPT it is so hard to see!

I have found a macro which turns the cell yellow when it is active which is really helpful. Please see below.

Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)

'Update 20140923

Static xLastRng As Range

On Error Resume Next

Target.Interior.ColorIndex = 6

xLastRng.Interior.ColorIndex = xlColorIndexNone

Set xLastRng = Target

End Sub

 

 

But I cannot save it!  It keeps asking me to save in a different format which I do but still no joy.

Please, could someone clever enough to know the answer and also clever enough to explain it in layman's  term.let me know?

If you can a donation to a charity will be made.  Mike T

  

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    If you want to save a workbook contains macros, then you have to save it in one of these formats:

    • Excel Macro-Enabled Workbook (.xlsm)
    • Excel Binary Workbook (.xlsb)
    • Excel 97-2004 Workbook (.xls)
    • Excel 5.0/95 Workbook (.xls)

     

    I recommend you to use the first one.

Resources