vba_php
Forum Troll
- Local time
- Today, 17:05
- Joined
- Oct 6, 2019
- Messages
- 2,880
hey you guys,
a little weirdness here, which I've seen so many times with VBA in excel. here is my code (partial):
this line is the problem:
r.offset is a text field. I set the properties literally through the interface. extension_name is declared a string. when this line of code runs, the results are supposed to be this:
however, with the extensions that that are just numerics, I get the following results, without the period:
what is going on here? here is what I see after the code runs as well, if I hover over any offending cell:
can you guys assist with this? It seems like it's an issue with my program settings, but I don't know where it's at. does excel do this marking by default? as in, insert apostrophes before numbers automatically? thanks.
a little weirdness here, which I've seen so many times with VBA in excel. here is my code (partial):
Code:
For Each r In Range("b2", "b4727")
lng_period_loc = 0
Do Until lng_period_loc > 0
For i = Len(r) To 1 Step -1
cur_loc_searched = i
str_temp = Mid(r, cur_loc_searched, 1)
If str_temp = "." Then
lng_period_loc = cur_loc_searched
len_r = Len(r)
extension_name = Mid(r, lng_period_loc, (len_r - lng_period_loc) + 1)
r.Offset(0, 1) = extension_name
GoTo nextCell
End If
Next i
Loop
nextCell:
Next r
Code:
r.Offset(0, 1) = extension_name
Code:
=> .0
.py
.lib
.pyc
etc, etc...
Code:
0
1
2
etc, etc...
can you guys assist with this? It seems like it's an issue with my program settings, but I don't know where it's at. does excel do this marking by default? as in, insert apostrophes before numbers automatically? thanks.