Consulting

Results 1 to 10 of 10

Thread: How do you get Excel VBA to realize the default properties again

  1. #1
    VBAX Contributor Daxton A.'s Avatar
    Joined
    Jun 2004
    Location
    Biloxi, Mississippi
    Posts
    143
    Location

    How do you get Excel VBA to realize the default properties again

    I was coding and used a module name of numberFormat() and realized that it was already a default property of excel. Now, I changed the name of my module but Excel still mirrors the name¿

    I even searched the whole workbook using CTRL + F and didn't find any other name usage other than the default property names.

    Now, i cannot get my actual .NumberFormat property to work.

    Also, I cannot upload the spreadsheet because it is too big. Any clue?

    Thanks,
    Daxton
    “All right now ya wise guy … Dance!”

  2. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    331
    Location
    Is it an issue in a new workbook?
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    VBAX Contributor Daxton A.'s Avatar
    Joined
    Jun 2004
    Location
    Biloxi, Mississippi
    Posts
    143
    Location
    Well this maybe an issue with the RAM as well. That PC needs a replacement.

    I was able to open one of my previous copies and just rewrite my module with a different name but that still doesn't increase my future endeavor knowledge of how to write "Microsoft's Default Code" back the way that it was. (Don't know the proper terminology)
    “All right now ya wise guy … Dance!”

  4. #4
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    331
    Location
    If it is not an issue in other workbooks, possibly problem wb is corrupted.

    I have never encountered this but then I never named a module same as intrinsic function or property.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    VBAX Contributor Daxton A.'s Avatar
    Joined
    Jun 2004
    Location
    Biloxi, Mississippi
    Posts
    143
    Location
    Nope, it isn't a ram issue. I tried it on a new workbook on a different pc and it did the same thing.
    “All right now ya wise guy … Dance!”

  6. #6
    VBAX Contributor Daxton A.'s Avatar
    Joined
    Jun 2004
    Location
    Biloxi, Mississippi
    Posts
    143
    Location
    Quite possibly, a new task for Bill Gate's to tackle.
    “All right now ya wise guy … Dance!”

  7. #7
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    331
    Location
    On another PC? Exactly what did you do in that new workbook? Did you do the same error?

    What version of Excel?
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    One thing you can try

    1. Export the numberFormat module
    2. Remove it from the WB
    3. Save WB
    4. Close Excel

    5. Use Notepad and edit numberFormat.bas

    The first lines look like

    Attribute VB_Name = "numberFormat"
    
    Option Explicit
    so change the VB_Name to "something" and save it as "something.bas"


    6. Open Excel, open WB, import "something.bas"
    Last edited by Paul_Hossler; 03-21-2023 at 09:09 AM.
    ---------------------------------------------------------------------------------------------------------------------

    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

  9. #9
    VBAX Contributor Daxton A.'s Avatar
    Joined
    Jun 2004
    Location
    Biloxi, Mississippi
    Posts
    143
    Location
    Yes that worked for me Paul, thanks. So that tells me that as long as the Module is still in existence, then the system code is still funky. Thanks for the wisdom everyone!

    Daxton Allen
    “All right now ya wise guy … Dance!”

  10. #10
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    You should also just be able to type something like:

    Dim NumberFormat
    and then delete it in order to reset the capitalisation (I assume that was the only issue).
    Be as you wish to seem

Tags for this Thread

Posting Permissions

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