+ Reply to Thread
Results 1 to 3 of 3

Transfer Spreadsheet loop: Interior color changing

  1. #1
    Registered User
    Join Date
    01-18-2011
    Location
    Yorktown, Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Transfer Spreadsheet loop: Interior color changing

    Hello all!

    I have an access database that houses information based on any number of projects. I have a form with a multi-select list box with multiple projects that a user can select. The loop starts by selecting the first project selected and running a query based on that project. The query is then inserted into an existing workbook using the transferspreadsheet method in access. After the query is transferred, various code is run to format the data in excel, part of which is setting the selection.interior.color property. After all formatting is complete, the excel workbook is closed, and the loop continues with the next project.

    All is fine except the cell colors. If I run just one project, then i get the exact colors i want, however if i run more than one, only the last report exported has the correct colors. All of the previous ones that were exported are different than what they were set as before the workbook was saved.

    I'm probably being about as clear as mud, i will try to explain better if needed, but any ideas?

    Thanks!
    Ryan
    Last edited by 02Pir8; 01-18-2011 at 03:44 PM.

  2. #2
    Registered User
    Join Date
    01-18-2011
    Location
    Yorktown, Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Transfer Spreadsheet loop: Interior color changing

    I have a feeling it may have something to do with the color pallette, i.e. the colors that i am using in my code are custom and change the palette, but when the loop closes and opens excel it is resetting the color palatte.

    Is there anyway to carry the same pallate throughout the loop?

  3. #3
    Registered User
    Join Date
    01-18-2011
    Location
    Yorktown, Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Transfer Spreadsheet loop: Interior color changing

    I fixed it (kind of). I was saving as an .xls file, and i am guessing since i used a custom color, it snapped it to the closet color on the 2003 pallatte when it would reopen. Saving as an .xlsx fine keeps the formatting.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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