
You can convert decimal to binary!

Use the following Worksheet function:
Dec2Bin Function
VBA Code
You can convert decimal to binary.
Option Explicit
Sub sampleProc()
Dim targetNum As Long
'Set "target decimal"
targetNum = 10
'Convert decimal to binary
MsgBox WorksheetFunction.Dec2Bin(targetNum, 6)
End Sub
Result
You converted decimal to binary!

FYI No.1
Also, you can convert binary to decimal!
For more information, see the following article:
FYI No.2
For more information about following, see the following official online manual:
●“Dec2Bin method” of “WorksheetFunction Object”
●DEC2BIN Function