View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jason jason is offline
external usenet poster
 
Posts: 39
Default input box reference

I can't get on the Formula1: line to refer to the month entered into the input box. My input into the box would be jan, feb, mar, apr, may, jun, jul, aug, etc. becuase that is how I have them on the spreadsheet. So for conditional formatting I need it to refer to exactly the way I type it into the input box. If mnth = Input box how do I type it below for the formula1: line to refer to what I type in.

Private Sub CommandButton7_Click(
mnth = InputBox("Enter the month to highlite:"
With Range("N4:SortRef") 'Sort Ref is just a cell nam
Range("SortRef").Activat
Selection.FormatConditions.Delet
Selection.FormatConditions.add Type:=xlCellValue, Operator:=xlEqual, Formula1:= 'Refer to input box???????
Selection.FormatConditions(1).Interior.ColorIndex = 4
End Wit
End Sub