lior03
01-23-2006, 06:51 AM
hello
how do i make the right click menu visible .
i want to add an item to the cell shortcut only when the cell or selection i choose contain formula and if not then make it invisible.just like the comment items that apear only if there is a comment.
what about
Sub createcomment()
Dim cell As Range
For Each cell In selection
If cell.HasFormula Then
Dim NewItem As CommandBarControl
Set NewItem = CommandBars("Cell").Controls.Add
NewItem.Caption = "turn formula red"
NewItem.OnAction = "marco"
NewItem.BeginGroup = True
NewItem.FaceId = 393
Else
End If
Exit Sub
Next
End Sub
thanks
how do i make the right click menu visible .
i want to add an item to the cell shortcut only when the cell or selection i choose contain formula and if not then make it invisible.just like the comment items that apear only if there is a comment.
what about
Sub createcomment()
Dim cell As Range
For Each cell In selection
If cell.HasFormula Then
Dim NewItem As CommandBarControl
Set NewItem = CommandBars("Cell").Controls.Add
NewItem.Caption = "turn formula red"
NewItem.OnAction = "marco"
NewItem.BeginGroup = True
NewItem.FaceId = 393
Else
End If
Exit Sub
Next
End Sub
thanks