Results 1 to 2 of 2
  1. #1
    ckeola is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    1

    Unhappy Access vba code to Export tbl data to Excel spreadsheet?

    I am at my ropes end with this... I am very new to vba.



    I have a db with a tbl and a form.
    I have an Excel Workbook with multiple spreadsheets.
    In a spicific spreadsheet I add data to the bottom of a long list of data.
    That data starts in Column A and goes through Column T.
    Every Row is a Single record(Company name, title, phone number, etc.)

    spreadsheet format:
    Code:
    record ID	first name	last name	title	company	address	and so on
    84395	John	Smith	President	Random Inc.	555 Main St	yes
    NOTE: the record ID's will already exist before the data gets to me, and will need to stay the same.

    The db that I am using: "my_db"
    The tbl in "my_db" is: "my_tbl"
    The already existing Excel Workbook: "my_excel"
    The spreadsheet to be used in "my_excel" is: "my_spreadsheet"


    I want to:
    push a button on my form and the following happens...
    - all the data in "my_tbl" is selected and copied(but NOT the headers)

    - paste copied data(something comparable to paste special/CSV) into the first empty cell of Column A in "my_spreadsheet". [The Columns in "my_spreadsheet" have formulas and formatting that should not be altered]

    - I do not want "my_excel" to be closed after this operation.

    NOTE: "my_excel" will already be open, but minimized.


    I have tried and tried... now I just want to put in the code so that I can shave minutes off of this task, which I do all day.

    Please help.
    Last edited by ckeola; 08-12-2010 at 12:05 PM. Reason: spelling error

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I believe the TRANSFERSPREADSHEET method automatically pastes data below the end of the data if you transfer it to an existing spreadhsheet but I could be wrong. been a while since i've used it. If all else fails. you can simply open the book and loop the access table to write the data line by line

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

Similar Threads

  1. Importing Excel 2007 spreadsheet into Access 2002
    By jhjr in forum Import/Export Data
    Replies: 1
    Last Post: 06-17-2010, 02:05 PM
  2. Replies: 2
    Last Post: 02-19-2010, 08:05 PM
  3. Access export to Excel
    By Rick West in forum Import/Export Data
    Replies: 4
    Last Post: 01-09-2010, 03:40 PM
  4. Export Access Pivot Table to Excel
    By graviz in forum Programming
    Replies: 1
    Last Post: 11-13-2009, 07:30 AM
  5. importing excel spreadsheet issues
    By majortool in forum Import/Export Data
    Replies: 1
    Last Post: 01-24-2008, 06:29 PM

Tags for this Thread

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