Im trying to introduce a value like "0001" to a cell with vba but all I set is 1 with no 000
this is my code
Dim iRow As Long
Dim ws As Worksheet: Set ws = Worksheets(BD_PRODXSIST)
With ws
.Range("A" & iRow).Value = "0001"
End With
Set ws = Nothing
To insert as text makes use of the apostrophe.
Or you can also change the format after entering the number: