ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Retrieving data from Excel and store it into string variable (https://www.excelbanter.com/excel-programming/316140-retrieving-data-excel-store-into-string-variable.html)

marsulein[_4_]

Retrieving data from Excel and store it into string variable
 

Hi NickHK,

I have just get it working. The problem lies with the spreadsheet
itself. You see, there are 900 records in there, and I am not the one
that wrote all those data in. The point is, the data entry person did
some mistakes, there are some fields which is emptied.

It is also my mistakes not to check for empty fields, I will build in
that function after this.

Just wanna say thanx for your help along the way.

And before I go, though that 2 method of creating RecordSet are
different, they have the same result. It's like doing

Dim MyName as String
Dim MyNick$

Regards,
marsulein


--
marsulein
------------------------------------------------------------------------
marsulein's Profile: http://www.excelforum.com/member.php...o&userid=16064
View this thread: http://www.excelforum.com/showthread...hreadid=275204


NickHK

Retrieving data from Excel and store it into string variable
 
marsulein,
Whilst the 2 methods achieve the same goal, they are not the same as you
indicate below.
With CreateObject you are using late binding, but Set xx = New you are using
early binding.

If you have a reference to ADO library, you may as well use it and not
suffer the late binding resolution time.

NickHK

"marsulein" wrote in message
...

Hi NickHK,

I have just get it working. The problem lies with the spreadsheet
itself. You see, there are 900 records in there, and I am not the one
that wrote all those data in. The point is, the data entry person did
some mistakes, there are some fields which is emptied.

It is also my mistakes not to check for empty fields, I will build in
that function after this.

Just wanna say thanx for your help along the way.

And before I go, though that 2 method of creating RecordSet are
different, they have the same result. It's like doing

Dim MyName as String
Dim MyNick$

Regards,
marsulein


--
marsulein
------------------------------------------------------------------------
marsulein's Profile:

http://www.excelforum.com/member.php...o&userid=16064
View this thread: http://www.excelforum.com/showthread...hreadid=275204





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

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