I wrote a script in VBA where numbers from a text file will be inserted into a worksheet. After inserting the values, Excel advises me to convert the values from strings to numbers. Inside the cell, a green triangle appears. After selecting the cell, there are different options you can select to format the value inside the cell.
I also tried to convert the values to double in VBA with CDbl(string) but nothing happens.
Changing the NumberFormat also doesn’t work. I tried different values in VBA and also in Excel.
I also tried to record a macro while selecting the method but there was nothing saved inside the makro.
Anybody know how to do this?

Try this. I have taken cell A1 as an example. Also if there are decimal values then instead of
Longuse aDoubleand change theNumberFormataccordingly.