Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Excel Startup Files

I have a worksheet with some macros needed for several other worksheets. I
have added it to my XLStart folder, however whenever I try to set a reference
to the startup file programmatically I receive an "error loading dll"
message. I have the workbook saved as a .xla, and I can open it correctly
manually. However, whenever I open it using the Workbooks.Open command, it
opens as Filename1, appears in my reference list as "Unsaved: FileName" and
I can not access the various modules in the code.

What do I need to do to make the code in this workbook available to other
workbooks?
  #2   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Excel Startup Files

If you have it saved as an add-in you could load it once as an add-in
excelToolAdd-InsBrowse

--
When you lose your mind, you free your life.


"Rhonda" wrote:

I have a worksheet with some macros needed for several other worksheets. I
have added it to my XLStart folder, however whenever I try to set a reference
to the startup file programmatically I receive an "error loading dll"
message. I have the workbook saved as a .xla, and I can open it correctly
manually. However, whenever I open it using the Workbooks.Open command, it
opens as Filename1, appears in my reference list as "Unsaved: FileName" and
I can not access the various modules in the code.

What do I need to do to make the code in this workbook available to other
workbooks?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Excel Startup Files

Unfortunately, that is not working for me either.

Here is the code I am using for the file as an add-in (modified code from
www.jkp-ads.com/Articles/DistributMacro10.htm).

Set fso = New Scripting.FileSystemObject

If fso.FolderExists("K:\Windows") Then

setDir = "E:\"


Else
setDir = "C:\"

End If

CurAddInPath = setDir & strDirectory & sFileName
AddInLibPath = Application.LibraryPath & "\" & sFileName

FileCopy CurAddInPath, AddInLibPath

With AddIns.Add(Filename:=AddInLibPath)
.Installed = True
End With

This code selects the add-in, but the other code can not access the modules.
Am I missing something?

"ben" wrote:

If you have it saved as an add-in you could load it once as an add-in
excelToolAdd-InsBrowse

--
When you lose your mind, you free your life.


"Rhonda" wrote:

I have a worksheet with some macros needed for several other worksheets. I
have added it to my XLStart folder, however whenever I try to set a reference
to the startup file programmatically I receive an "error loading dll"
message. I have the workbook saved as a .xla, and I can open it correctly
manually. However, whenever I open it using the Workbooks.Open command, it
opens as Filename1, appears in my reference list as "Unsaved: FileName" and
I can not access the various modules in the code.

What do I need to do to make the code in this workbook available to other
workbooks?

  #4   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Excel Startup Files

How are you to trying to get the other programs to access the macros in your
"add-in" ? instead of setting a refrence to the workbook can you just do this?


Application.Run("MYMACROPAGE.XLA!My_Func_Sum",MyAr gumentList)

ben
--
When you lose your mind, you free your life.


"Rhonda" wrote:

I have a worksheet with some macros needed for several other worksheets. I
have added it to my XLStart folder, however whenever I try to set a reference
to the startup file programmatically I receive an "error loading dll"
message. I have the workbook saved as a .xla, and I can open it correctly
manually. However, whenever I open it using the Workbooks.Open command, it
opens as Filename1, appears in my reference list as "Unsaved: FileName" and
I can not access the various modules in the code.

What do I need to do to make the code in this workbook available to other
workbooks?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Excel Startup Files

I tried this option and it does not work. I am basically doing some
authenticating using SQL statements and stored procedures on the Worksheet
Change event. This code works great when in the actual worksheet, but I have
about 10 worksheets that need this code. There is one piece of the code that
sets a validation for our various offices. However, this information can
change. I am trying not to have to edit each worksheet when we close/open a
new office.

"ben" wrote:

How are you to trying to get the other programs to access the macros in your
"add-in" ? instead of setting a refrence to the workbook can you just do this?


Application.Run("MYMACROPAGE.XLA!My_Func_Sum",MyAr gumentList)

ben
--
When you lose your mind, you free your life.


"Rhonda" wrote:

I have a worksheet with some macros needed for several other worksheets. I
have added it to my XLStart folder, however whenever I try to set a reference
to the startup file programmatically I receive an "error loading dll"
message. I have the workbook saved as a .xla, and I can open it correctly
manually. However, whenever I open it using the Workbooks.Open command, it
opens as Filename1, appears in my reference list as "Unsaved: FileName" and
I can not access the various modules in the code.

What do I need to do to make the code in this workbook available to other
workbooks?

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
multiple files open upon startup Vicki B New Users to Excel 1 March 11th 10 05:51 PM
Excel 2000 Auto Opens 24 files on startup CSUFAlex Excel Discussion (Misc queries) 7 January 20th 06 01:30 AM
Automatically opening several Excel Files at startup SD Excel Discussion (Misc queries) 1 June 8th 05 05:32 PM
Automatically opening several Excel Files at startup Peo Sjoblom Excel Discussion (Misc queries) 0 June 8th 05 05:20 PM
opening files from explorer with startup file and addin Anthony Ryan Excel Programming 3 October 20th 03 11:00 PM


All times are GMT +1. The time now is 03:01 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"