View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default A Boolean expression

Where apparently there are several..? users each with their own lil
macro for marking and labeling or whatever. The toggle on - off was
also a hit.


I'd go a different way where 1 macro serves all usser via the 1st
character of their username...

Sub CellCol_User() '//Ctrl+Q
Dim c
For Each c In Selection
c.Interior.ColorIndex = IIf(c.Interior.ColorIndex < 6, 6, xlNone)
c.value = IIf(c.Interior.ColorIndex = 6, Left(Environ("username"),
1), Empty)
Next 'c
End Sub

...and keep the color as criteria for the toggle because...

c.value = IIf(c = "", "A", "")

...won't remove "A". IOW, the letter persists after the color toggles.


I'll take a look at the link...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion