Results 1 to 2 of 2

Thread: Opening an excel workbook from a template in Access VBA

  1. #1
    Leroy_Brown
    Guest

    Opening an excel workbook from a template in Access VBA

    Hi there.....this may be a doosie but i was wondering if anyone knew how to go about opening an excel document derived from an excel template through VBA code in my Access form. I understand whenevr you open a template a new workbook is created but have no idea how to handle the code.

    Any insight would be helpful.

    Thanks

  2. #2
    Junior Member
    Join Date
    Aug 2001
    Location
    MidCentral ( Between MidWest and MidEast)
    Posts
    19
    Hope this is what you want.

    You need to reference the excel object in the access module references under tools.


    dim oExcel as excel.application
    set oExcel = new excel.application

    oExcel.workbooks.Add Template:= _
    "C:\Program Files\Microsoft Office\Templates\Format_Files.xlt"

Posting Permissions

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



Click Here to Expand Forum to Full Width