Reading Excel Table in VBA

M

Mike

Hi everyone,

1) Which is faster: VB.Net or VBA? I heard conflicting answers...
2) Using VBA, how an excel table with Name Box, e.g. "Prof", can be
read?

Thanks,
Mike
 
G

GS

Hi everyone,

1) Which is faster: VB.Net or VBA? I heard conflicting answers...
2) Using VBA, how an excel table with Name Box, e.g. "Prof", can be
read?

Thanks,
Mike

I expect they both read a table the same speed, depending on the
methodology used. I recommend you simply 'dump' the entire table
(range) into a variable of type 'Variant':

Example:
Dim vTableData As Variant
vTableData = ActiveSheet.Range("<TableDataAddressOrName>")
'do stuff with the data...
'dump the data back into the worksheet
ActiveSheet.Range("<TableDataAddressOrName>") = vTableData

However, VBA runs within Excel whereas VB.Net does not and so requires
'automating' an instance of Excel to use VB.Net. Also, you require a
licensed copy of the VB.Net programming language software. VBA comes
with MS Office as its built-in macro language and so is free.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top