Results 1 to 2 of 2
  1. #1
    Deutz is offline Advanced Beginner
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    51

    Get column headings from closed Workbook

    I am using Access 2003

    On a form I would like to get a list of worksheets from a closed Excel workbook and then display the column headings of the worksheet that a user selects.

    I have some VBA code that will work for an open workbook but wondering how to do this with a closed workbook?



    Thanks in advance

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    open it first using VBA, then use your way.
    Code:
        Dim objXL As New Excel.Application
        Dim BK As Excel.Workbook
        Set BK = objXL.Workbooks.Open("s:\a.xls")
    ...

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

Similar Threads

  1. Replies: 12
    Last Post: 09-13-2012, 12:07 PM
  2. Cross Tab Column Headings...
    By mhoctober in forum Queries
    Replies: 3
    Last Post: 09-10-2010, 01:21 PM
  3. check if all objects are closed (forms & reports)
    By RedGoneWILD in forum Access
    Replies: 2
    Last Post: 09-03-2010, 05:53 PM
  4. Deleting Worksheets on a Excel workbook
    By BED in forum Programming
    Replies: 0
    Last Post: 07-27-2010, 01:20 PM
  5. Page Headings
    By maintt in forum Reports
    Replies: 2
    Last Post: 07-22-2010, 05:18 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