Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default get column name by ADOX

Change the following part of my previous post as shown below...

---
Another way...

Dim sTableNames As String, sTableName As String
For Each tbl In cat.Tables
sTableName = Replace(tbl.Name, "$", "")
sTableNames = sTableNames & "|" & sTableName
Next 'tbl


Dim vTableNames, aListItems() '//**change1

vTableNames = Split(Mid$(sTableNames, 2), "|")
Dim lNumTables As Long, i As Long
lNumTables = UBound(vTableNames)


ReDim aListItems(lNumTables, 1) '//**change2

For i = LBound(vTableNames) To UBound(vTableNames)
aListItems(i, 0) = vTableNames(i)
aListItems(i, 1) = cat.Tables(i + 1).Name
Next 'i
ListBox1.ColumnCount = 2
ListBox1.List = aListItems

HTH


--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ado / Adox ? silvest[_21_] Excel Programming 0 November 6th 04 10:41 PM
Ado / Adox ? silvest[_20_] Excel Programming 1 November 6th 04 09:55 PM
Ado / Adox ? silvest[_17_] Excel Programming 2 November 6th 04 09:35 PM
Ado / Adox ? silvest[_19_] Excel Programming 0 November 6th 04 05:53 PM
Ado / Adox ? silvest[_18_] Excel Programming 1 November 5th 04 11:22 PM


All times are GMT +1. The time now is 05:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"