Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    UK
    Posts
    30

    Question Unanswered: Accessing Embedded Workbook from VBA

    I am working on a reporting macro and the final piece copies a lot of data into a template spreadsheet. This spreadsheet must be in the same directory as the sheet with the macro code in it. To make sure they don't get separated I have embedded a copy of the template into the macro.

    I can manually access the template by doubling clicking on the embedded icon and saving the file but I can't seem to figure out how to do this from code. Recording doesn't work.

    Does any one know.

    Any help would be great.

    Thanks in advance ;o)

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    Quote Originally Posted by kadanis
    To make sure they don't get separated I have embedded a copy of the template into the macro.
    Not sure what you mean by this, but if you mean you physical put a copy in the macro, it won't work.


    Quote Originally Posted by kadanis
    I am working on a reporting macro and the final piece copies a lot of data into a template spreadsheet. This spreadsheet must be in the same directory as the sheet with the macro code in it.
    Perhaps you could include code to the path for the template. Such as

    Workbooks.Open Filename:= _
    "C:\Documents and Settings\user01\My Documents\myTemplate.xlt"
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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