Results 1 to 8 of 8

Thread: New version keeps calling up old version

  1. #1
    Board Regular
    Join Date
    Feb 2019
    Location
    A galaxy far, far away.
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default New version keeps calling up old version

    Hi folks,

    OK, got myself in a jam again.

    In a major re-building of my project (to make use of stuff I learned here ), I did a lot of copy/pasting procedures from the old version to the new. Obviously I did something wrong, because the new version keeps calling up (or trying to call up—I changed the filename) the old version. Now I get an (understandable) error that Excel can't find the old version, but it won't execute without it.

    How can I correct this, i.e is there some way to sever the connection between versions?

    TIA
    VBA tyro—"Explain as you would a child."
    Please comment examples to help me (and others new to VBA) understand what's going on. Thanks.

  2. #2
    Board Regular bobsan42's Avatar
    Join Date
    Jul 2010
    Location
    Bulgaria, GMT+2 (42.891813,25.313594)
    Posts
    1,281
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: New version keeps calling up old version

    What are the symptoms, the errors, anything? Or is it just crying for its buddy gone missing
    Is it only missing pieces of code or sheet formulas too?
    As far as I know there is no link - unless there are formulas linked to external wb but you will get a message on the subject.

    Did you do debug->compile? Do you use Option Explicit in your modules.
    You are probably missing variables, functions or routines which you forgot to transfer to the new file, but your new code still calls them from time to time.

    Use debug->Compile as many times as needed until no errors are left - try to sort each error.
    If after this your code fails again:
    Use Option Explicit as first line in all your modules. (this will raise an error every time you use a variable without declaring it first - tedious at first bur tremendously reduces the amount of silly hard to catch errors. Simply good practice)
    Then again debug->Compile as many times as needed until no errors are left.
    "...it's sad that in our blindness we gather thorns for flowers..."
    mostly using:
    windows 7 +10 (64-bit) / excel 2013 +2016 (32-bit) / access 2013 +2016 (32-bit) / some imagination & Google of course
    You don't need to read between the lines - just read them all!

  3. #3
    New Member
    Join Date
    Nov 2014
    Location
    Luxembourg
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: New version keeps calling up old version

    What about named ranges? Does your code have any references to named ranges. Those can have links to older versions.

  4. #4
    Board Regular
    Join Date
    Feb 2019
    Location
    A galaxy far, far away.
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: New version keeps calling up old version

    Quote Originally Posted by bobsan42 View Post
    Use Option Explicit as first line in all your modules.
    Thanks, I do. Keeps me diligent (as I can be at this level).

    It may be sheet formulas. I was testing out a Sub that cleared selected cells in a worksheet. The Sub is called by a Command Button on the worksheet to be cleared. The Button Sub is:

    Code:
    Sub Button2_Click()
        Sheet1.Clear_Character_Sheet
    End Sub
    I've tried it with/without "Call" in front of Sheet1.Clear_Character_Sheet.
    When I click the button (which worked fine in previous version) I get:
    Sorry, we couldn't find [Earlier Version Filename]. Is it possible it was moved, renamed, or deleted?

    That's exactly what I did—rename it hoping that not being able to find it, the program would go to the new version's Sub.

    It didn't.

    You are probably missing variables, functions or routines which you forgot to transfer to the new file, but your new code still calls them from time to time.
    I checked for that. That's not the problem.
    VBA tyro—"Explain as you would a child."
    Please comment examples to help me (and others new to VBA) understand what's going on. Thanks.

  5. #5
    Board Regular
    Join Date
    Feb 2019
    Location
    A galaxy far, far away.
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: New version keeps calling up old version

    Quote Originally Posted by higrm View Post
    What about named ranges? Does your code have any references to named ranges. Those can have links to older versions.
    Nope. My project isn't complex enough to make use of/require them. It works out better for me to comment the single cells or few small ranges I'm dealing with.
    VBA tyro—"Explain as you would a child."
    Please comment examples to help me (and others new to VBA) understand what's going on. Thanks.

  6. #6
    Board Regular bobsan42's Avatar
    Join Date
    Jul 2010
    Location
    Bulgaria, GMT+2 (42.891813,25.313594)
    Posts
    1,281
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: New version keeps calling up old version

    Well, I look at it and I make assumptions:
    - You are using Form Controls command buttons on a sheet.
    - You actually copied the old sheet with the buttons from the old file into the new one.
    The I take a wild guess: your buttons are linked to the macros in your old file. (although this would trigger the broken external links dialog normally, if checking is not turned off)

    Basically you have to assign locally available macros to your buttons.
    Right click on the button, select Assign macro ... and check if the currently assigned macro doesn't lead to your old filename ? If yes correct it - select some of the macros, available in the new one.

    I believe this is the problem, but I've been wrong before
    "...it's sad that in our blindness we gather thorns for flowers..."
    mostly using:
    windows 7 +10 (64-bit) / excel 2013 +2016 (32-bit) / access 2013 +2016 (32-bit) / some imagination & Google of course
    You don't need to read between the lines - just read them all!

  7. #7
    Board Regular
    Join Date
    Feb 2019
    Location
    A galaxy far, far away.
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: New version keeps calling up old version

    Quote Originally Posted by bobsan42 View Post
    I believe this is the problem, but I've been wrong before
    Not this time—you are correct. I couldn't read the file—too long, and the cursor keys/End didn't work, so I canceled out, tried again, and copied the highlighted file name into Notepad (sheesh! ).

    But it got the job done and seems to work fine now. I don't know why, but Button1 doesn't have that problem; I must have done something different(?)

    Hopefully, this will be the end of calling up the old version, but from your earlier, I'll have some other places to check.

    Thanks much!
    VBA tyro—"Explain as you would a child."
    Please comment examples to help me (and others new to VBA) understand what's going on. Thanks.

  8. #8
    Board Regular bobsan42's Avatar
    Join Date
    Jul 2010
    Location
    Bulgaria, GMT+2 (42.891813,25.313594)
    Posts
    1,281
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: New version keeps calling up old version

    glad I could help.
    "...it's sad that in our blindness we gather thorns for flowers..."
    mostly using:
    windows 7 +10 (64-bit) / excel 2013 +2016 (32-bit) / access 2013 +2016 (32-bit) / some imagination & Google of course
    You don't need to read between the lines - just read them all!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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