Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Matilda Hughes   on Sep 12 In MS Office Category.

  
Question Answered By: Naba Malik   on Sep 12

My 1st observation would be to exchange your if/then logic  to case/select.

vGetCellValue = Cell.Value
Select Case vGetCellValue
Case "g"
Cell.Font.ColorInde x = 4
Cell.Interior.ColorIndex = 4
Case "b"
Cell.Font.ColorInde x = 1
Cell.Interior.ColorIndex = 1
Case "r"
Cell.Font.ColorInde x = 3
Cell.Interior.ColorIndex = 3
Case Else
'default option
End Select

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Trying to get VBA macro to be smarter Or get search suggestion and latest updates.


Tagged: