Hi Chrissy,
It is SO hard to find a problem that is not there after the editor is
opened.
You may want to add some Stop statements throughout your code and remove
them one by one until it crashes - that way, you may be able to determine
where the crash is taking place. Sometimes, when code crashes as the user
runs it but not from the VBE, it is caused by timing issues. Some
well-placed DoEvents statements where the crash is taking place (or an
Application.Wait) may fix the problem for you.
--
Regards,
Jake Marx
www.longhead.com
Chrissy wrote:
Keith Willshaw wrote
Chrissy wrote
I have developed an Excel spreadsheet which I want to run
on 15 different computers.
I developed it in Excel 2002 and Excel 2000 - depending one
which machine I was at. It is to run on Excel 2000. I cannot
make it fail in any way on my computer but it does on all other
computers I have tried it on now.
My setup is:
Win2k Professional
Office XP Professional installed then
Excel from Office 2k professional installed separately then,
because Office XP stopped working
Office XP Professional reinstalled
This suggests your installation may well have a bundle of
different dll's floating around
I have proved this - I found one DLL in my setup that was for Excel
10. Since writing this I have uninstalled Excel for Office 2002 from
my machine and reinstalled Excel for Office 2000. Then I noticed
that I still had the Excel 10 DLL.
Their setup
Win98
Office2k Professional
Win98 is rather unstable for professional use IMHO
Yeah - but that is not my call. Maybe it is now.
I have a couple of forms and 10 worksheets. I have protected the
project from viewing and the worksheets are all password protected.
There is a button on the first spreadsheet which opens up the main
form. This causes a page fault in Excel and Excel then closes.
On which machine?
Yours , theirs or both ?
Theirs and I forgot to add the important bit - after rebooting (or
using the Task Manager to kill the Excel process that is floating
around and still has the workbook open) if I
open the workbook
remove protection from viewing from it
save it
close Excel
and reopen the workbook
open the VBA editor
run the code
I do not get any problems.
It is SO hard to find a problem that is not there after the editor is
opened.
The computer
needs rebooting at this stage so the workbook can be reopened as
it will get a sharing problem if just opened without a reboot.
The computer is not networked.
If I remove the protection from the project it works on one machine
but not on one other. If I run it on my machine even after a
reboot and without entering any passwords it runs fine. I run it
under Excel2k and not Excel XP.
Am I correct in thinking that I must be using different DLLs to
the other machines? What can I do to get this working?
You WILL be since you are using different OS but this shouldnt
matter.
I meant DLLs which are for different versions of Excel - not the
changes needed for different OSs.
Any help or suggestions are more than welcome.
It sounds to me like a corrupt workbook, I'd suggest dumping
out all the code modules and importing them into clean workbook
OMG - I never even considered this - bugger. I have always taken
all code and forms and put them in a new workbook in the past before
giving the person the "system".
Alternately try VBA Code Cleaner which essentially
does the same thing
http://www.bmsltd.co.uk/MVP/Default.htm
Thanks - will try that and see what happens but think I will put it
in a
new workbook anyway - even though there are 100s of named ranged
in the 10+ worksheets.
Thank you so much for your help.
Chrissy.