Thread: Code cleanup
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
peter.thompson[_53_] peter.thompson[_53_] is offline
external usenet poster
 
Posts: 1
Default Code cleanup


I am using this code 30 times to "reset" 30 commandbuttons on a
worksheet.
There must be a more elegant way? Any assistance much appreciated

Cheers,

Peter (new to VBA)

With ThisWorkbook.Sheets("Benefits").CommandButton1
If Range("a100").Value < "" Then
..BackColor = &HFFC0C0
Else
..BackColor = &HE0E0E0
End If
End With


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=502302