shaggz7even
Programmer
Im using the QueryTables.Add method to import data from a web site.
One of the records is an eighteen digit account number. When VBA retrieves the number, it gets it single precision number, which when formatted, turns the last 2 digits or so to zeros
Is there a property of the add method i need to set to retrieve the data as text?
This is what i got:
With Worksheets("Query".QueryTables.Add _
Connection:="URL;" & strURL, _
Destination:=Range("a1")
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
'.PreserveColumnInfo = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.PreserveFormatting = True
End With
this
50020000120002344
looks like this
5.002E+16
which turns out like this
50020000120002300
which sucks
Any help would be appreciated
thanks
One of the records is an eighteen digit account number. When VBA retrieves the number, it gets it single precision number, which when formatted, turns the last 2 digits or so to zeros
Is there a property of the add method i need to set to retrieve the data as text?
This is what i got:
With Worksheets("Query".QueryTables.Add _
Connection:="URL;" & strURL, _
Destination:=Range("a1")
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
'.PreserveColumnInfo = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.PreserveFormatting = True
End With
this
50020000120002344
looks like this
5.002E+16
which turns out like this
50020000120002300
which sucks
Any help would be appreciated
thanks