Results 1 to 6 of 6
  1. #1
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328

    Export a value to specific Excel cell

    I have tried the various posted solutions for exporting values from Access to a specific cell in an existing excel file. I can't make any of them work or even comprehend some. Can someone give me anexample of the code, actuated from a click on button named CommEx on Form1, that will transfer a single value to a cell in an existing excel file? To keep it simple, let's say that I want to export the number 12 to a cell named 'Length" (or cell B5 if need be) in an excel file named Dimensions.xls. (stored in current project path)


    I am using A2007 with W7 but also have access to A2003 with W7. Thanks in advance, any help much appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you see this one?

    http://support.microsoft.com/kb/219151

    There's a lot more there than you need, but it appears to be commented well enough that you can ignore what you don't need.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dsmacs is offline Advanced Beginner
    Windows XP Access 2010 (version 14.0)
    Join Date
    Oct 2009
    Location
    Perth Western Australia
    Posts
    52
    Sample in 2003, should work in 2007.

    Cheers
    Darren

  4. #4
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328
    Thanks for quick reply and easy to use example, but works ok only for C:\ dimensions.xls. In A2003, if I use the pulldown for another location I get an error message that the file can't be found. In A2007, it just locks up. If I use file location as CurrentProject.path\dimensions.xls, I get same error message. Is this some W7 phenomena?

  5. #5
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328
    Hi dsmacs-Problem fixes itself, not sure why-my new 64 bit Sony and A2007 have given me several fits. But, working great and does just what I need. Still can't get it to accept CurrentProject.path, but will work on it and not a big deal in this case. Thanks so much. You really simplified it down to my level, much appreciated.

  6. #6
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328
    Hi PBaldy and thanks. I got another reply that was more at my level. I tried to extract my needs from the code on the suggested site and had problems ksimplifying it to exporting to an existing excel file.

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

Similar Threads

  1. Import Specific Cells from Excel to Access
    By Evocube in forum Import/Export Data
    Replies: 2
    Last Post: 01-12-2012, 10:35 AM
  2. Hyperlink to a specific Field/Cell?
    By tbutters in forum Database Design
    Replies: 8
    Last Post: 06-04-2010, 12:27 PM
  3. importing a single cell from excel onto access
    By virus100 in forum Import/Export Data
    Replies: 0
    Last Post: 03-20-2010, 11:57 AM
  4. Import single cell from excel
    By zippy483 in forum Import/Export Data
    Replies: 9
    Last Post: 02-24-2010, 02:16 PM
  5. Can we post Access cell data to Excel cell properties?
    By Zethro in forum Import/Export Data
    Replies: 1
    Last Post: 12-13-2005, 08:42 AM

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