Debug suggestions?

K

KR

I've created a workbook with 2 userforms and my macros; it all works well on
my PC and several others. For the few folks who have had problems, they have
been able to email me screenshots so that I know where the errors are
occuring and can fix them. Everyone is using either Win2000 or WinXP, and
Office2000 or Office2003.

However, I have one person who's PC I don't have easy access to, who is
having a problem I haven't seen and I'm not sure how to debug.

What appears to work:
---------------------------
Worksheet_open code
the one button in the worksheet to open the userform

However, when she clicks on a commandbutton on the userform, it crashes her
excel. This is the same file that seems to be working on everyone else's PC.

Are there any settings or other issues that could cause a problem executing
userform code? The one time I observed this crash on her PC (in person) it
was when she clicked on a button that only has four lines of code; one to
clear a listbox, a for-next loop, and in the loop, a line of code that adds
names into the listbox. Since the workbook and code works for everyone
else... I'm not sure what to check next. I can open the exact same file on
my PC and it works fine, so there isn't anything wrong with the names list
or other pieces of code, it is something that is different about the Excel
or Windows files (e.g. potential corruption) or settings that is beyond
anything I've had to deal with before.

Any ideas?
Thanks,
Keith
 
T

Tom Ogilvy

have her go into here temp directory and delete all files and in any
directories below the temp directory. Particularly files in these
directories that have a *.exd extension.

...\temp\vbe\msforms.exd

as an example.

This should be done with Excel closed.
 
T

Tom Ogilvy

there may be directory lower than 1 level, such as

...\temp\excel8\vbe\msforms.exd

Anything in temp and below should be cleared - removing these subdirectories
would probably be good as well.
 
K

KR

Thanks Tom! I'll see if I can get access to try this out, and will post back
if that PC still has problems with the workbook.
:)
Keith
 
K

KR

Tom-

We're still having the problem, and I managed to get access to one PC long
enough to check the debug window and have two new pieces of information.

First, in that particular workbook, it stopped on the following line in
workbook_open (whereas the other PC would open the workbook without an
error); the [A1] was highlighted in the debugger;

Last = Sheet4.Cells.Find(What:="*", After:=[A1],
SearchDirection:=xlPrevious).Row

and in that particular PC, the following reference was missing;

Microsoft Windows Common Controls-2 6.0 (SP4)

I'm wondering if different PCs have different images (between Office 2000
and 2003, or due to the installation on some PCs of other programs like MS
Visio, etc.). If the machine doesnt have the target file at all, we can
install it with a batch file, and I'll do some searching to see what I need
to do to register it from within a batch file or within my workbook_open
code.

I have to admit, I'm way outside of my knowledge zone- I've never built
anything in VBA that didn't work directly with any other user, and the only
things I have in my code that I've not used before are the monthview control
and the line:
WhoAmI = VBA.Environ("UserName")

That, and that this workbook resides on a server, so while our network has
always appeared very robust, maybe there is something related to the network
that could interact and cause problems as well?

Thanks for any advice,
Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top