• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro for freeze cell

shibulal

Member
Hi,


I was trying to freeze the cell with the following program. It works with the worksheet of mine.


But the problem is that when the same worksheet sent to another person by mail, this MACRO doesn't work.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)


Dim TabOrder As Variant

Static TabPos As Long


TabOrder = Array("B2")


TabPos = IIf(TabPos > UBound(TabOrder), 0, TabPos)

Application.EnableEvents = False

Range(TabOrder(TabPos)).Activate

Application.EnableEvents = True

TabPos = TabPos + 1


End Sub
 
Did you save the file as an *.xlsm or *.xlsb ?

Did the receiver of the file enable macros when they opened the file?
 
.xlsx format does not support macros. You'll need to change the extension to either .xlsm or .xlsb
 
Back
Top