+ Reply to Thread
Results 1 to 5 of 5

Debug suggestions?

  1. #1
    KR
    Guest

    Debug suggestions?

    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

    --
    The enclosed questions or comments are entirely mine and don't represent the
    thoughts, views, or policy of my employer. Any errors or omissions are my
    own.



  2. #2
    Tom Ogilvy
    Guest

    Re: Debug suggestions?

    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.

    --
    Regards,
    Tom Ogilvy



    "KR" <[email protected]> wrote in message
    news:%[email protected]...
    > 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
    >
    > --
    > The enclosed questions or comments are entirely mine and don't represent t

    he
    > thoughts, views, or policy of my employer. Any errors or omissions are my
    > own.
    >
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: Debug suggestions?

    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.

    --
    Regards,
    Tom Ogilvy

    "KR" <[email protected]> wrote in message
    news:%[email protected]...
    > 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
    >
    > --
    > The enclosed questions or comments are entirely mine and don't represent

    the
    > thoughts, views, or policy of my employer. Any errors or omissions are my
    > own.
    >
    >




  4. #4
    KR
    Guest

    Re: Debug suggestions?

    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

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > 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.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "KR" <[email protected]> wrote in message
    > news:%[email protected]...
    > > 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
    > >
    > > --
    > > The enclosed questions or comments are entirely mine and don't represent

    > the
    > > thoughts, views, or policy of my employer. Any errors or omissions are

    my
    > > own.
    > >
    > >

    >
    >




  5. #5
    KR
    Guest

    Re: Debug suggestions? - more info

    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




    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > 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.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "KR" <[email protected]> wrote in message
    > news:%[email protected]...
    > > 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
    > >
    > > --
    > > The enclosed questions or comments are entirely mine and don't represent

    > the
    > > thoughts, views, or policy of my employer. Any errors or omissions are

    my
    > > own.
    > >
    > >

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1