Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default VBE References Missing from Exported File

I have a purchased database program that exports data to a blank Excel file.
When I go into Tools Addins, the exported Excel file has the right add-in
connections to Analysis Toolpak, but when I go into the VBE editor the
references to ATPVBAEN.xls are missing. I've tried to fix this by putting
the ATPVBAEN.xls reference into my Excel template, but that had no effect on
the export file. I've tried adding the Analysis ToolPak by using VBA code
(although it's already connected from the worksheet), but that didn't work
either. I can create the connection manually by just getting out of Excel
and opening the exported Excel file again. But how do I programmatically
impose VBE references on an Excel file created by the purchased database
program?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default VBE References Missing from Exported File

You need to set a reference to "Analysis ToolPak - VBA". You can
do this manually, or with code like


Application.AddIns("Analysis ToolPak - VBA").Installed = True
ThisWorkbook.VBProject.References.AddFromFile _
Application.AddIns("Analysis ToolPak - VBA").FullName


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stratuser" wrote in
message
...
I have a purchased database program that exports data to a blank
Excel file.
When I go into Tools Addins, the exported Excel file has the
right add-in
connections to Analysis Toolpak, but when I go into the VBE
editor the
references to ATPVBAEN.xls are missing. I've tried to fix this
by putting
the ATPVBAEN.xls reference into my Excel template, but that had
no effect on
the export file. I've tried adding the Analysis ToolPak by
using VBA code
(although it's already connected from the worksheet), but that
didn't work
either. I can create the connection manually by just getting
out of Excel
and opening the exported Excel file again. But how do I
programmatically
impose VBE references on an Excel file created by the purchased
database
program?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default VBE References Missing from Exported File

I've tried this, and it adds the references, and the add-ins are there, but I
still get the message that ATPVBAEN.xla can't be found, even though it's
right there. It's as if the instance of Excel that is launched by the
purchased database program doesn't recognize the references and add-ins, no
matter what I do. What does work is just closing Excel and re-opening the
very same exported file. Then all the references are recognized. Very
mysterious...

"Chip Pearson" wrote:

You need to set a reference to "Analysis ToolPak - VBA". You can
do this manually, or with code like


Application.AddIns("Analysis ToolPak - VBA").Installed = True
ThisWorkbook.VBProject.References.AddFromFile _
Application.AddIns("Analysis ToolPak - VBA").FullName


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stratuser" wrote in
message
...
I have a purchased database program that exports data to a blank
Excel file.
When I go into Tools Addins, the exported Excel file has the
right add-in
connections to Analysis Toolpak, but when I go into the VBE
editor the
references to ATPVBAEN.xls are missing. I've tried to fix this
by putting
the ATPVBAEN.xls reference into my Excel template, but that had
no effect on
the export file. I've tried adding the Analysis ToolPak by
using VBA code
(although it's already connected from the worksheet), but that
didn't work
either. I can create the connection manually by just getting
out of Excel
and opening the exported Excel file again. But how do I
programmatically
impose VBE references on an Excel file created by the purchased
database
program?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
why are there quotes in my exported text file? Gordon Excel Discussion (Misc queries) 2 February 16th 05 06:59 PM
Can an excel XP 2003 file be exported to an Access mdb file if so how? No Name Excel Programming 0 October 22nd 04 04:43 AM
Missing References Dick Scratcher Excel Programming 4 September 10th 04 01:23 PM
References.Remove References(1) DOES NOT WORK for "MISSING:" Refs Jamie Carper[_2_] Excel Programming 0 May 27th 04 04:22 PM
Missing References Steve Andrews Excel Programming 0 January 20th 04 03:26 PM


All times are GMT +1. The time now is 01:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"