+ Reply to Thread
Results 1 to 6 of 6

My code crashes excel

Hybrid View

  1. #1
    Registered User
    Join Date
    09-04-2006
    Posts
    29
    Thanks but that isn't it

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by ben_sumner
    Thanks but that isn't it
    Dunno, I commented out the 'Dim VBCodeMod As CodeModule' and added several sheets ok

    Can you test your code with this version?

    ---
    Attached Files Attached Files
    Last edited by Bryan Hessey; 10-05-2006 at 06:17 AM.

  3. #3
    Registered User
    Join Date
    09-04-2006
    Posts
    29
    Thanks..I gave it a go and it worked fine but didn't add the code to worksheets. There is a second problem with with finding the codename of the sheets. The first time you run it, it will return a blank value. All othertimes it works fine.

    I solved the first problem....Its was because I had the form open in the background and never closed it after then new sheet had been inserted. I tried a simple hide then show again (because i need the form to be open at all times) but that did't work either. What worked was hiding the form and then opening it using module that only had form.show in it and calling it using the ontime method 1 second after I close the form.

    I know that it sounds crazy and i'm not sure the reasoning behind it working ut its works and im happy.

    Thanks for all your help Bryan

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by ben_sumner
    Thanks..I gave it a go and it worked fine but didn't add the code to worksheets. There is a second problem with with finding the codename of the sheets. The first time you run it, it will return a blank value. All othertimes it works fine.

    I solved the first problem....Its was because I had the form open in the background and never closed it after then new sheet had been inserted. I tried a simple hide then show again (because i need the form to be open at all times) but that did't work either. What worked was hiding the form and then opening it using module that only had form.show in it and calling it using the ontime method 1 second after I close the form.

    I know that it sounds crazy and i'm not sure the reasoning behind it working ut its works and im happy.

    Thanks for all your help Bryan
    Good to see, as you observed, it was a little over my '10%'.

    Thanks for the response.

+ 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