# Creating A Report In Excel Using VB6



## The Great One (Sep 27, 2001)

Basically what I want to do is select a criteria in Visual Basic from a list of fields (from a MDB), and then export the data into Excel.


Only things I must be able to do is allow my users to customise my searches and have the report create themselves automatically.


----------



## Rockn (Jul 29, 2001)

So you are using Access and Excel? Just make a form in Access that has a pulldown list for the set criteria and create a button that will run the report and copy it to Excel. Not sure of the exact coding, but there should be a sample in the help.


----------



## The Great One (Sep 27, 2001)

I am Using MS Access 97 to store the data.

I am Using VB6 As The Front End

I am Using Exccel 97 To Develope The Reports


----------



## Rockn (Jul 29, 2001)

Why not use VB or just Access to do all of the above? Seems like a pain and a waste of client resources to use 3 apps when one will do the job.


----------



## The Great One (Sep 27, 2001)

Front End VB Is Better Then Access

Access For The Data Storage

Excel So My Clients Can Manipulate the data once report is created.


----------



## downwitchyobadself (Oct 13, 2000)

Well, if a VB front end is that much "better" than Access (I'm unconvinced), you ought to at least be able to build a query on the Access back end, create a link from it in Excel (read this humble Access/Excel thread to see how to set up Excel to find out about reading an Access query in Excel), and let you "manipulate" that.

Rockn is right. The place to manipulate data as Excel does it is in Excel, Great One, not in VB.


----------



## The Great One (Sep 27, 2001)

If I am using a VB front End How do I change the criteria in which I am filtering within the Access Query? I need to be able to set the criteria in VB and have the system change this criteria in the Access Query!


----------

