Consulting

Results 1 to 11 of 11

Thread: Excel Crash

  1. #1

    Excel Crash

    Hi there

    my Excel file crashes when clicked on the only visible button of the worksheet ("Klik hier om te starten").

    It doesn't crash on my computer, but on the computer of 2 colleagues it does crash. I have to mention they use it on a laptop; my pc is a desktop.

    We all use the same version of Excel: Excel 2003 SP3.

    My computer: Win Xp; 3 Ghz; 0,99 GB RAM
    One Colleague: Win Wp; 1,83 Ghz; 504 MB RAM

    I already used the VBA debugger, no problems found. Could it be pc-related?
    Thanks for your much appreciated help!

    I had to upload to external server due to limited upload on this forum:
    Links is 7 days valid from now on (monday 27 march)

    http://www.yousendit.com/transfer.ph...ZDVnYVB2Wmc9PQ

    Thanks again

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I have just tried it on a laptop, and it didn't crash for me.

    XP pro, 2.6GHz, 4.0 GB RAM
    Excel 2003, SP3
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    Not enough information given. I for one am not prepared to open a file from someone I don't know,based on the information you have currently provided.

    Please indicate what type of file is it, & what is on the sheet, what the button is supposed to do, and what you were doing when it failed.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    Could you describe what you mean by "crash"? Do you get a runtime or compile error, or does Excel give you the famous "Excel has experienced a problem and needs to close, we're sorry for the inconvenience" dialog?
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  5. #5
    "Excel has experienced a problem and needs to close, we're sorry for the inconvenience" is what i get.

    What does this file do?
    -1- Calculate the price for print advertisments (in one or more newspapers)
    -2- Make an automated MS Word document featuring ei. the prices
    -3- And (if preferred) an e-mail with that MS Word document (NOT sending, make mail)

    All throught input via the Wizard.

    IMPORTANT PS:

    It was developped to be used under the Dutch version of Excel. If the user doesn't use that version, you will get another userform.

  6. #6
    I might upload another version without the language check (tommorow). I didn't get any errors now after deleting the language check (for now...).

  7. #7
    I find it unusual to use a separate form for a different language, I would change the labels and such on the fly.

    Maybe your project needs cleaning:
    http://www.appspro.com/Utilities/CodeCleaner.htm
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  8. #8
    Quote Originally Posted by Jan Karel Pieterse
    I find it unusual to use a separate form for a different language, I would change the labels and such on the fly.
    Hi Jan Karel & everyone else

    First of all, I've uploaded a version without language check here:

    http://www.yousendit.com/download/bF...Q1JvQUpFQlE9PQ

    1. I will try to clean my code, but unfortunatly I can't clean it here at my workplace (no admin rights). I'll try it at home.

    2. I guess there is a misunderstanding here; I'll explain it better:

    - I check several settings from the user - including what version of Excel is used on the computer. If the MS Excel version is different than Dutch, one gets another "alerter" userform (indicating that the excel file should be used in a dutch version of excel). If all settings are good (see my Boolean --> vwVoldaan); then the file will operate as it should.

    In "Sub geldigheid"; you will find this:
    ********************************
    If VwVoldaan = False Then
    Geldig.Show
    Else
    RRS.Show '<------------ I guess this triggers the crash!
    End If
    ********************************

    Under RRS-userform:
    ********************************
    Private Sub UserForm_Initialize()
    Application.Run "Init"
    End Sub
    ********************************

    I uploaded a version without the language check here: (for those of you who don't have the dutch excel):

    http://www.yousendit.com/download/bF...Q1JvQUpFQlE9PQ

    In Dutch:

    Het bestand controleert eerst een aantal instellingen, waaronder of de gebruikte versie een Nederlandstalige versie is van Excel. Is dat niet het geval (vb Engels) dan zal de gebruiker een userform ("Geldig") te zien krijgen dat de gebruiker hierop wijst (i.p.v. de echte Wizard van de toepassing).

    Is het een Nederlandstalige versie (en andere instellingen zijn ook goed; cfr Boolean "vwVoldaan"); dan kan de gebruiker het bestand gebruiken en zal de userform "RRS" tevoorschijn komen.

    Volgens mij loopt het fout bij het tevoorschijn komen van de userform "RRS".

    Hier vind je de versie zonder controle van oa. taalinstellingen:

    http://www.yousendit.com/download/bF...Q1JvQUpFQlE9PQ

  9. #9
    I suspect the crash may be caused by the rrs form, it has a lot of controls, maybe something has gone wrong with it.

    I have a couple of tips on your code if I may.

    1. You use application.run a lot, this is not needed, better to use the subroutine names directly, so instead of
    application.run "Init", just use Init.

    2. You have placed a lot of the initialisation code for the userform outside of the codemodule of the form, it is better to have the code that is just for the userform in the module of the userform itself.

    3. Why would your application only work on Dutch Excel? That should not be needed.
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  10. #10
    Quote Originally Posted by Jan Karel Pieterse
    3. Why would your application only work on Dutch Excel? That should not be needed.
    Thx for your advice; I'll keep that in mind!

    The Dutch excel is need for the formatting of the numbers. I export the values from several TextBoxes to a MS Word document. In the English version; the comma means "thousands". The opposit for the point. Thats' actually the only reason!

    In my code, you'll also find this: ".Style = "Tabelraster"" - so I should also add the English option for this. (should'nt be a problem for me though).

    thx!

  11. #11
    Quote Originally Posted by Jan Karel Pieterse
    1. You use application.run a lot, this is not needed, better to use the subroutine names directly, so instead of
    application.run "Init", just use Init.
    I deleted all "application.run" (in all modules), but it doesn't seem to work for me. Could it be you mean: use "init" (in my case) in the userform_activate (and leave application.run in the modules ontouched)?

    EDIT: I renamed a subroutine, now your method works fine! Thank you!
    Last edited by bruinenat; 03-30-2010 at 04:47 AM.

Posting Permissions

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