Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904


    Oh wow, i didnt know that i can record a macro in excel and use it in access. I would definitely like to give it a try. Thank you Joe.
    Here is an article which explains how you can run Excel macros from Access: http://datapigtechnologies.com/blog/...xcel-workbook/
    What you would probably want to do is take your current macro in Access, and select it and run the "Convert Macros to Visual Basic" functionality on it.
    This will convert your Macro to VBA code that you can build on. So you can add VBA code to open your data file and call and run your Excel Macro code on it.

    But pardon me may be i am not so keen on going to tables or queries as my supervisor would not like it also i am not adept in explaining to him
    Once again, no one has to go into the Tables or Queries to export them - not even you! You can export data from them using a Macro or VBA code using a Button like you are now. All you need to know is the Query or Table name (which can easily be seen in the Record Source property of your Report).
    You can use the "ImportExportSpreadsheet" Macro action. In the Table Name argument is where you enter the name of the Table or Query (yes, you can use Queries here, even though it says Table Name).

  2. #17
    New.User is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    37
    Now I understand why you were insisting on exporting the query to excel. It is so much easier and convenient and also the cells are arranged neatly. Thank you Joe.

  3. #18
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Now I understand why you were insisting on exporting the query to excel. It is so much easier and convenient and also the cells are arranged neatly. Thank you Joe.
    You are welcome. I am glad you now "see the light"!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. command button to export to excel
    By jains in forum Forms
    Replies: 5
    Last Post: 06-30-2015, 06:27 PM
  2. Replies: 6
    Last Post: 06-04-2014, 12:00 AM
  3. Replies: 2
    Last Post: 03-19-2012, 05:08 AM
  4. Export to excel on button click
    By Jim.H. in forum Access
    Replies: 2
    Last Post: 01-29-2012, 12:16 PM
  5. Replies: 0
    Last Post: 03-13-2011, 03:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums