Hello,
I think I have a fairly simple block of code here, and most of it works, but the ElseIf never happens to change the cell to V. The If before it has no problem setting the cell to H. I also tried just using an Else, but that didn't work either. I'm not getting an error or anything, and the hidden state of the rows does toggle each time it runs.
Thanks
I think I have a fairly simple block of code here, and most of it works, but the ElseIf never happens to change the cell to V. The If before it has no problem setting the cell to H. I also tried just using an Else, but that didn't work either. I'm not getting an error or anything, and the hidden state of the rows does toggle each time it runs.
Thanks
Code:
Sub ToggleCOGSAlcohol()
Dim Alcohol As String
Alcohol = Worksheets("DNT").Application.Range("B6").Value
With Rows("54:59")
.Hidden = Not .Hidden
End With
If Alcohol = V Then
Range("DNT!B6").Value = "H"
ElseIf Alcohol = H Then
' Else
Range("DNT!B6").Value = "V"
End If
End Sub