Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. DataPaper

    Int to Bin 2021

    and going the other way... Function b2d(b) n = InStr(1, b, "1") b = Mid(b, IIf(n = 0, 1, n)) n = Len(b) - 1 For c = 0 To n b2d = b2d + 2 ^ (n - c) * Mid(b, c + 1, 1) Next c End Function NOTE: Trims leading 0's
  2. DataPaper

    Int to Bin 2021

    This code snippet by SkipVought is the best on the www IMO. Here is modifying it so you can optionally set the padding... Function i2b(i, Optional p = 0) Do i2b = i Mod 2 & i2b i = Fix(i / 2) Loop Until i = 0 i = Len(i2b) If i < p Then i2b = String(p - i, "0") & i2b

Part and Inventory Search

Back
Top