Results 1 to 6 of 6
  1. #1
    EDUGRA is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    6

    Export to Excel with Multiple Spreadsheet Tabs and Format

    Hello!

    Does anyone has a MS Access template with the code to export data to MS Excel with multiple tabs?



    I've looked it up and ended up finding this one below, but I couldn't make it work.

    https://www.mrexcel.com/board/thread...sheets.287392/

    Thanks.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    That is a pretty standard way to do it so why couldn't you make it work? You get an error? everything on one tab? something else?

  3. #3
    EDUGRA is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    6
    Apparently, I'm getting an error in the part:

    .HorizontalAlignment = xlLeft
    .VerticalAlignment = xlBottom
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .IndentLevel = 0
    .ReadingOrder = xlContext
    .MergeCells = False

  4. #4
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by EDUGRA View Post
    Does anyone has a MS Access template with the code to export data to MS Excel with multiple tabs?
    Couldn't follow the link you posted, but have you seen Ken's ACCESS Examples and Information for Working With EXCEL Workbook Files?

    I had to export a record set (actually around 5 reports) to Excel, then do some formatting and adding a couple of formulas to tot al a couple of columns. If you want to see the code I wrote, let me know.


    ** The little bit of Excel formatting that you posted is of no help without seeing the whole sub - can't tell what the declarations are or what is happening in the code.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    Quote Originally Posted by EDUGRA View Post
    Apparently, I'm getting an error in the part:

    .HorizontalAlignment = xlLeft
    .VerticalAlignment = xlBottom
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .IndentLevel = 0
    .ReadingOrder = xlContext
    .MergeCells = False
    If you are going to continue with coding, you need to be way more precise?
    You need to identify the procedure, the line and the error description.

    Otherwise all you are asking is 'How long should my piece of string be'
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    @Edwin - the OP specifically asked for "code"....
    Does anyone has a MS Access template with the code to export data to MS Excel with multiple tabs?
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 07-23-2020, 11:32 AM
  2. Export to Excel; One query, multiple tabs by unit
    By catluvr in forum Import/Export Data
    Replies: 10
    Last Post: 04-05-2018, 05:04 PM
  3. Replies: 2
    Last Post: 05-16-2013, 07:43 PM
  4. Replies: 12
    Last Post: 12-17-2012, 12:47 PM
  5. Export Filtered Results to Excel Tabs
    By opod in forum Programming
    Replies: 1
    Last Post: 08-03-2011, 01:33 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