If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Accessing Embedded Workbook from VBA

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-04, 11:11
kadanis kadanis is offline
Registered User
 
Join Date: Mar 2004
Location: UK
Posts: 30
Question 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)
Reply With Quote
  #2 (permalink)  
Old 05-26-04, 11:56
shades shades is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On