Opening Macro Files

  • Thread starter Thread starter VBA-PA
  • Start date Start date
V

VBA-PA

I have two files containing macros that I placed in XLSTART. These are
distributed to several users on individual PCs

In some cases One file opens and runs...the other does not.

Looking at other posts I checked to see if the file was disabled by excel on
the PCs experiencing the problem. The file was not disabled.

Any suggestions?
 
Whenever code works on one computer but not another, you may assume it has to
do with a missing reference. Take a look at this:
http://www.cpearson.com/excel/MissingReferences.aspx

What is the exact error message? When you open the Reference window, does
it say 'MISSING' next to any of the references that you are invoking?

Try that recommendation and if it doesn't work come back with more details
please.

HTH,
Ryan---
 
Hi VBA-PA,

A possible cause of missing references, see the reply of Ryan, is that the
PC's are running a different Office version. Office 2003 is e.g. version 11,
someone still using a lower version, will have a lower reference (2002 =10)
and thus causing this error.

To avoid this, us late binding.


Wkr,

JP
 
Thank you for your response.

There is no error displayed. The one file that does not run would normally
add a menu with several menu items in it. When I start-up Excel, there is no
sign of the file opening (IE. no new menu or menu items, the file is not open
and hidden, I open up VBA and the Project is not present open). It appears
as if there was no attempt to open this second fole on these select PCs.

On the computers where it successfully opens both files:
- The newly created menu and menu items are present in Excel
- the second file appears on the list of hidden files
- the project for the second file appears in the VBA environment.

I will confirm the references but there were no errors indicating a
problem. Would you expect this to be the case?

Thanks again.
 
What type of file is the one not opening?

Templates(*.xlt or *.xltx) do not open automatically from XLSTART folder.

Another thing to look at.............

There may be several XLSTART folders on a user's computer.

Are both files in the correct folder?


Gord Dibben MS Excel MVP
 
Thanks for your reply. Both files are ".xls" files. They are both located
in the same XLSTART folder. I can't imagine why they wouldn't both open. If
there was an error, I would expect some evidence that it attempted to open
the file...but there is none that I can find.

Once Excel opens, I can then manually open the file and the files opens as
expected and tha macro(s) that should run upon workbook_open execute properly
without any errors.
 
I cannot replicate this behavior with normal setup.

Two workbooks(*.xls) in XLSTART folder.

Both open each time Excel is started.

Hopefully we can get some more responses to this problem.


Gord
 
Back
Top