ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   dynamically assigning QueryTables.Add.TextFileColumnDataTypes (https://www.excelbanter.com/excel-programming/365816-dynamically-assigning-querytables-add-textfilecolumndatatypes.html)

Alan D. Ayers

dynamically assigning QueryTables.Add.TextFileColumnDataTypes
 
FYI ..

I wanted to do this and was having all kinds of issues. Here is what it
looks like in the documentation

..textfilecolumndatatypes = array(1,2,1,3) ...etc

Here is what I wanted to do
A(0) = 1
A(1) = 2
A(2) = 1
A(3) = 3
..textfilecolumndatatypes = a

Did not work.

I changed this
Option Base 1
A(1) = 1
A(2) = 2
A(3) = 1
A(4) = 3
..textfilecolumndatatypes = a

This worked.
--


Fantastically,

Alan Ayers


All times are GMT +1. The time now is 01:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com