MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Excel Macro Help Needed

  Asked By: Harry    Date: Jan 31    Category: MS Office    Views: 2392

I need a help from you all.I need to finish this task by tomorrow so
please help me on this task.Since i am very new to Excel VBA i am finding very
difficult to do this.

I need to write a excel macro which will connect to MS Access database and
export the resultant data to an Excel Sheet.

I need to design a excel such a way that when user clicks a button on the
front page of the excel sheet that should automatically save the content to a
new excel sheet.

I hope that i clearly explained the requirement.Please help me on this.If you
got any sample code for database connection also please send me.



5 Answers Found

Answer #1    Answered By: Hubayshah Mansour     Answered On: Jan 31

You're not giving us much to go on. Where is the 'data' to which you
refer. In a table? A query? Which versions of Access and Excel? When
this separate file saves, should it also contain the rest of the Excel
sheet to which you imported the data, or just the data  itself? (NB in
the latter case, it will be much, much easier simply to export to a file
straight from Access.)

The more detail we have, the more likely we are to be able to help.

Answer #2    Answered By: Dallas Martin     Answered On: Jan 31

I am using excel  2000 and Access 2000.

I am retrieving the data  from the table.I need to put two buttons on the front
page of the excel sheet.When user  clicks first button  it should retrieve the
data from a table and display in the first sheet  i.e sheet1 and similarly when
he clicks  the second button it shouls export the data to the second sheet i.e
sheet2 of the same excel workbook.

I too just now started to work on this one.Please help  if possible.Please
reply if you any doubt i am ready to reply.

Answer #3    Answered By: Tracy Cole     Answered On: Jan 31

OK. Part 1 is the import from the table into Excel. This page  shows a
god method:


The second is moving it to another sheet  in the same workbook. The easy
way is simply to copy the worksheet. Try this code:

Sheets("Sheet1").Copy Before:=Sheets(2)

Answer #4    Answered By: Adalrich Fischer     Answered On: Jan 31

I think it will help  me a lot to proceed in my work.i will
get back u if i find any problem.

Didn't find what you were looking for? Find more on Excel Macro Help Needed Or get search suggestion and latest updates.