arrays - Dynamically format columns on Workbook.OpenText using FieldInfo in VBA -


I am writing a program in VBA to open open a text file To continue, I want to open text on format cells (issue: long string string is being converted into numbers and is sorted). Through research through

I have learned that it can be done using the FieldInfo for the argument. Opentext .

All current examples working on the Internet are stable and require the programmer to enter FieldInfo: = Array (Array (1,2), Array (2,2) ..... Here's the closest I got in Array (n, 2) .

but this does not work either. It gives me a 1004 error This is my version:

  dim colInfo (from 1 1000,1 to 2) I = 1 to 1000 colInfo (i, 1) = i colInfo (i, 2) = 2 next I  

I can not find any vba document if array not variable dim I can make y as x (), so i can solve this problem. I will be greatly appreciated!

Array function only gives one version - this is a quick way of initial time, so you can simply create one of them and pass it as your logic. For: variant v1 = array (1, 2, 3) readymade v2 (3) v2 (0) = 1 v2 (1) as variant, v2 like sub aBC

  ) = 2 v2 (2) = 3 messages Aks v1 (0) & amp; VbTab & amp; V2 (0) & amp; VbCr & amp; V1 (1) & amp; VbTab & amp; V2 (1) & amp; VbCr & amp; V1 (2) & amp; VbTab & amp; V2 (2) end sub  

These two arrays (v1 and v2) are the same.

I hope it helps.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -