Results 1 to 14 of 14
  1. #1
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    running a form on various versions (200/97)

    I am having trouble running a userform which was made and programmed in 2000 but must run on 97 on another computer. When the user drops the list box and chooses one of the options an error pops up saying fatal error and the rest of excels wonderful jargon. The error causes an invalid page fault in fm20.dll whatever that means. The funny thing is that if you run through the code in break mode it works just fine but not when run by itself. I have tried to save it as multiple versions and recopy the dll file from another computer but the program fails to run by itself on any computer running 97. I find this puzzling. Please Help!

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Can you post a copy of the workbook with everything except what is needed to demonstrate the problem deleted?
    Legare Coleman

  3. #3
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Okay Legare, I took out almost everything that I thought was not needed and the file size is 286kb. I am not sure if I will be allowed to upload it but i will try anyway. After taking out extra code not relevant to this question I tried it again on the 97 system and it once again failed.

    Here is what you will see. Upon opening the file a userform immediatly pops up. the problem is in the "upper left hand corner of the form" when the user chooses the search criteria and then clicks the drop down list and chooses a sample to view, it fails on 97 but no problem on 2000.

    thanks

    Yep, I tried to send it and it said the file was to big, do you want me to send it somewhere else?

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Can you compress it with PKZIP?
    Legare Coleman

  5. #5
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Good thought, i forgot about that
    Attached Files Attached Files

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Well, I seem to be able to choose anything from the drop down box with no problems on my Excel 97/SR2. What service level are the machines you are having problems with?
    Legare Coleman

  7. #7
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Well, Legar, I was excited for a bit when i saw that we were running SR-1 so we loaded up sr-2 and restarted the computer....same error. AHHHHHHH
    now what?

  8. #8
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    I just downloaded the workbook onto a second system with Excel 97/SR2, and I don't have any problems there either.

    However, I do see something that looks very suspicious. If I click on Disable in the Excel virus protection dialog box that asks if I want to enable macros, I get a second dialog box that says that the workbook contains Excel 4 macros that can not be disabled. However, I can not find any Excel 4 macro sheets in the workbook. If I use a macro to get Application.Excel4MacroSheets.Count, it comes up zero which says that there are no Excel 4 Macro Sheets in the workbook. This indicates to me that there is some corruption in the workbook that is causing these problems. I would recommend creating a new workbook and copying everything to the new workbook.
    Legare Coleman

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    One also gets the xl4 macro warning dialog with:
    - some defined name functions
    - when old style form buttons have a macro assigned to them
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  10. #10
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Legare, I tried what you said and it unfortunatly did not work. This is so frusterating. I do have as jan said both defined names and old form buttons so I am going to take them out and see what happens.

  11. #11
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    That would be my next suggestion.
    Legare Coleman

  12. #12
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    well, I took out the form button and tried to take out the defined names but then my program will not work. This is because to set the RowSource property for the list box I had to define a name which counts the number of non -blank cells and then sets that as the rowsource by saying
    listbox.RowSource = "samplerange" where sample range is the defined name

    I tried to do the following with no avail

    range("h2").select
    while activecell.value <> ""
    activecell(2,1).select
    Wend

    row_empty = excel.activecell.row

    listbox.RowSource = range(cells(2,8),cells(row_empty,8)) 'VBA doesn't like this line...help
    this effectively counts the number of non blank cells and tries to set that as the RowSource. It is the only way I could think of doing it without naming ranges. Any other ways?

  13. #13
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    After removing those things, do you still get the message saying that there are Excel 4 Macrosheets in the workbook if you disable macros when you open the workbook? If not, then I would suggest renaming the range and using the name for the rowsource again. I don't think that there is a generic problem with names, just some specific names. Maybe Jan will jump back in with some suggestions. This is an area that I don't know much about.
    Legare Coleman

  14. #14
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running a form on various versions (200/97)

    Show me the defined function, maye I can come up with a VBA equivalent.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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