[Solved] VBA to ignore cell formating when adding a specific number using a userform


Since there is a single piece of code writing in column C:C, adapt it in the next way:

Instead of:

 Sheets("Sheet3").Range("C4").Select
 Selection.Borders.Weight = xlThin
 ActiveCell.Value = "." & TextBox3

Try this, please:

If TextBox3.Text = "6" then
    Sheets("Sheet3").Range("C4").NumberFormat = "@"
end if
With Sheets("Sheet3").Range("C4")
   .Borders.Weight = xlThin
   .Value = "." & TextBox3.Text
End With

2

solved VBA to ignore cell formating when adding a specific number using a userform