4/14/2023 0 Comments 7 segment font![]() I tried to make the conditional formatting formula consistent across the cells, but I just couldn’t. Next, I did the same thing with conditional formatting. OK, it’s really a 13 segment display – the seven segments and six connecting cells. 'for horizontal segments, fill left and right If aDigits(CLng(Mid$(sValue, i, 1)))(j) = lON Then Set rSeg = Sheet1.Range(aRange(i)).Offset(aRow(j), aCol(j)) Sheet1.Range(aRange(1)).Resize(5, 15).Interior.Color = lOFFįor j = LBound(aDigits(CLng(Mid$(sValue, i, 1)))) To UBound(aDigits(CLng(Mid$(sValue, i, 1)))) ![]() SValue = Format(lInput, String(lDISPCNT, "0")) ![]() 'Set the offset from the top left cell for each of theĪRange(i) = Sheet1.Range("B2").Offset(0, (i - 1) * 4).Address 'right top, middle, left bottom, right bottom, bottomĪDigits(0) = Array(lON, lON, lON, lOFF, lON, lON, lON)ĪDigits(1) = Array(lOFF, lOFF, lON, lOFF, lOFF, lON, lOFF)ĪDigits(2) = Array(lON, lOFF, lON, lON, lON, lOFF, lON)ĪDigits(3) = Array(lON, lOFF, lON, lON, lOFF, lON, lON)ĪDigits(4) = Array(lOFF, lON, lON, lON, lOFF, lON, lOFF)ĪDigits(5) = Array(lON, lON, lOFF, lON, lOFF, lON, lON)ĪDigits(6) = Array(lON, lON, lOFF, lON, lON, lON, lON)ĪDigits(7) = Array(lON, lOFF, lON, lOFF, lOFF, lON, lOFF)ĪDigits(8) = Array(lON, lON, lON, lON, lON, lON, lON)ĪDigits(9) = Array(lON, lON, lON, lON, lOFF, lON, lON) Public Sub ShowSevenSegment(ByVal lInput As Long)ĭim aRow(0 To 6) As Long, aCol(0 To 6) As Long
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |