+ Reply to Thread
Results 1 to 3 of 3

export from access multiple queries to same workbook into seperate sheets

  1. #1
    Guest
    Join Date
    01-02-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    30

    export from access multiple queries to same workbook into seperate sheets

    Hi again, unsure if this is an excel or access vba issue.

    I'm using access vba to export and format my workbook worksheets, but on the second loop it fails. i have removed most of the formatting code for clarity.

    so i'm up to this now, create workbook ok, copy employee sheets to seperate tabs ok, format each sheet - only the first sheet is being formatted, when it comes to do the next one it fails. i am changing to the next worksheet, i can see that happening, it then formats all cells for the first sheet, but fails on this line (only the second time) Current_Worksheet.Range("A1:P100").Select
    error is run-time error '-2147221080 (800401a8) method 'range' of object '_worksheet' failed i get the same error if i try Current_Worksheet.cells.select

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Last edited by alansidman; 01-30-2015 at 04:32 AM. Reason: code tags added

  2. #2
    Guest
    Join Date
    01-02-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    30

    Re: export from access multiple queries to same workbook into seperate sheets

    never mind i got it going.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: export from access multiple queries to same workbook into seperate sheets

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Multiple queries on MS Access
    By joe41 in forum Access Tables & Databases
    Replies: 1
    Last Post: 02-27-2009, 04:47 AM
  2. Export Access 97 to Excel on multiple worksheets extra sheets produced
    By syoung4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2007, 09:50 AM
  3. Workbook with 20+ queries of Access is TOO BIG
    By Kevin76 in forum Excel General
    Replies: 0
    Last Post: 04-26-2006, 11:40 AM
  4. Exporting Access Queries to sepcific ranges in an Excel workbook
    By MWACardsfan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-17-2005, 05:05 PM
  5. Access export to multiple sheets in Excel
    By Jeff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2005, 09:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1