Hello,
I have a problem with importing data from ms access to excel with VBA. I use "ADO Connection" to connect excel with acces. When I use "xlSheet.Range("A5").CopyFromRecordset rs" to import data from access db, it's works fine. But I want to skip some column in excel sheet. How can I do it? sorry im new in vba ..
my db table
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]id[/TD]
[TD]name[/TD]
[TD]date[/TD]
[TD]description[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
my excel sheet
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]id here[/TD]
[TD]name here[/TD]
[TD]date here[/TD]
[TD]skip column[/TD]
[TD]description here[/TD]
[/TR]
[TR]
[TD]..[/TD]
[TD]..[/TD]
[TD]..[/TD]
[TD]..[/TD]
[TD]..[/TD]
[/TR]
</tbody>[/TABLE]
I have a problem with importing data from ms access to excel with VBA. I use "ADO Connection" to connect excel with acces. When I use "xlSheet.Range("A5").CopyFromRecordset rs" to import data from access db, it's works fine. But I want to skip some column in excel sheet. How can I do it? sorry im new in vba ..
my db table
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]id[/TD]
[TD]name[/TD]
[TD]date[/TD]
[TD]description[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
my excel sheet
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]id here[/TD]
[TD]name here[/TD]
[TD]date here[/TD]
[TD]skip column[/TD]
[TD]description here[/TD]
[/TR]
[TR]
[TD]..[/TD]
[TD]..[/TD]
[TD]..[/TD]
[TD]..[/TD]
[TD]..[/TD]
[/TR]
</tbody>[/TABLE]