Export a range from excel into access 2007

Adi

New member
Joined
May 14, 2013
Messages
1
Reaction score
0
Points
0
Hello Dudes

I am looking for a simplified macro to export first range of column of Excel 2007 into MS Access 2007

say like creating a file call test.xls within MY DOCUMENT folder and container MS Access test2007.accdb

& populating excel first column like A1 - ID & A2-A100- with numbers

how can i export the data range A2 to A100 into access, any help appreciate

i saw one macro on excelguru, when I copied the example shown there and tried in my computer (it showed run time error)

so a simple macro will I appreicate
 

gsnidow

New member
Joined
Aug 30, 2011
Messages
38
Reaction score
0
Points
0
Location
Virginia
Adi, what you are trying to do is not what I would call "simple", its not too difficult, but still, not simple. If you copied and example from here somewhere, was it from a question or a solution? Did you make sure you changed all object refences to your arena? It was probably using ADO in some fashion, in which case you will get an error if you don't have an active reference to the appropriate library. Look at the code you are trying to use. Do you see something like "Dim rs As ADO.Recordset" at the top? Now, since you are in the VB editor, click on "Tools" then "References". If you don't see something like "Microsoft ActiveX Data Objects X.X", then you will need to scroll down and click the check box next to the appropriate library. If you go back to where you found it, look for some caveats, as they will probably mention this.

Greg
 
Top