Results 1 to 12 of 12

Thread: Big Crash

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,878
    Location
    Would something like that if run through on various attempts be enough to cause a crash?
    This is Excel so it's hard to say

    However, I've had good luck with ...

    http://www.appspro.com/Utilities/CodeCleaner.htm

    The Excel VBA Code Cleaner

    During the process of creating VBA programs a lot of junk code builds up in your files. If you don't clean your files periodically you will begin to experience strange problems caused by this extra baggage. Cleaning a project involves exporting the contents of all its VBComponents to text files, deleting the components and then importing the components back from the text files.
    Unfortunately it only works with 32 bit Excel, but you can still manually export modules and then import them (I think) since that seems to be how the cleaning function works



    I have seen examples of code where the dot occurs in more than one place on a line, always referencing back to the with command
    Option Explicit
    
    Sub test()
        With Worksheets("Sheet1")
            With .Cells(1, 1)
                MsgBox .Address
                With .Interior
                    MsgBox .ColorIndex
                End With
            End With
        
            With .Shapes(1)
                MsgBox .Name
            End With
        
            MsgBox .Name
        
        End With
    End Sub
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  2. #2
    VBAX Contributor
    Joined
    Apr 2014
    Posts
    128
    Location
    Also, Paul.. mine is 64bit, but I followed that link anyway and read it through. That is basically what I did.
    Thanks

Posting Permissions

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