RE: Fastest way to read data to populate combo controls?
- From: Lorin <Lorin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 Sep 2008 17:25:01 -0700
If I follow you..
Why not simply write the Excel data to a .csv or .tsv (tab) then read in to
VB app.
That would be the fastest since no objects would be involved.
If you write the Excel macro correctly you could read the data files in two
file gets it the data types support. i.e. get the number of types, resize
the type array the read all in one get. One pass for each set of data files.
What are the data types?
Or Using VBA in Excel? I think that it writes variants. And reading a
variant array into VB is also fast.
"Ed from AZ" wrote:
When my VB6 app opens, the Form.Load code opens a document, reads the.
info into six arrays, and then uses these arrays to populate six
combobox controls. The info in question are "attributes" assigned to
a folder of Word documents; through the combos, I select an attribute
and the VB app opens that document.
At the moment I'm using a Word document to hold the info, because I
have the info in separate tables and I can iterate through the Tables
collection to make sure the info gets into the correct array. I close
the doc, but keep the Word app object because I will use it later.
The Word doc is actually built using a macro in an Excel file. I
thought about just reading the Excel file on open and skipping the
Word doc, but I don't know if it would save any time when I open the
VB app (the Excel file and Word list doc are maintained during times
the VB app is not in use). I would save myself the extra step of
building the Word list file, but since it's a macro there's not real
time lost.
Another possibility would be to write the attributes to each Word doc
as CustomVariables, and iterate through the files reading these
variables into the arrays.
It doesn't take forever to open the app now, but there is a noticable
pause between launch and form open. If using the Excel file or Custom
Variables would reduce the pause, I'd like that.
Ed
- Follow-Ups:
- Re: Fastest way to read data to populate combo controls?
- From: Ed from AZ
- Re: Fastest way to read data to populate combo controls?
- From: Jeff Johnson
- Re: Fastest way to read data to populate combo controls?
- References:
- Fastest way to read data to populate combo controls?
- From: Ed from AZ
- Fastest way to read data to populate combo controls?
- Prev by Date: IDE Opening
- Next by Date: Re: IDE Opening
- Previous by thread: Re: Fastest way to read data to populate combo controls?
- Next by thread: Re: Fastest way to read data to populate combo controls?
- Index(es):
Relevant Pages
|
Loading