"excel vba alternate row color" Code Answer's
You're definitely familiar with the best coding language VBA that developers use to develop their projects and they get all their queries like "excel vba alternate row color" answered properly. Developers are finding an appropriate answer about excel vba alternate row color related to the VBA coding language. By visiting this online portal developers get answers concerning VBA codes question like excel vba alternate row color. Enter your desired code related query in the search bar and get every piece of information about VBA code related question on excel vba alternate row color.
excel vba alternate row color

Sub OddEvenTab(ByRef pRange As Range, firstColor As Long, secondColor As Long)
With pRange
.Interior.ColorIndex = xlNone
' In Formula1: choose comma or semicolon (to avoid Error 5)
.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2)=0"
.FormatConditions(1).Interior.Color = firstColor
.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2)<>0"
.FormatConditions(2).Interior.Color = secondColor
End With
End Sub
' ------------------------------------------------------------------------------
Sub TestMe()
OddEvenTab Range("A1:D12"), RGB(230, 230, 230), vbWhite
End Sub
All those coders who are working on the VBA based application and are stuck on excel vba alternate row color can get a collection of related answers to their query. Programmers need to enter their query on excel vba alternate row color related to VBA code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about excel vba alternate row color for the programmers working on VBA code while coding their module. Coders are also allowed to rectify already present answers of excel vba alternate row color while working on the VBA language code. Developers can add up suggestions if they deem fit any other answer relating to "excel vba alternate row color". Visit this developer's friendly online web community, CodeProZone, and get your queries like excel vba alternate row color resolved professionally and stay updated to the latest VBA updates.