+ Reply to Thread
Results 1 to 6 of 6

Running Macro's created in 2003 in 2007

  1. #1
    Registered User
    Join Date
    08-29-2008
    Location
    BlueBell
    Posts
    14

    Running Macro's created in 2003 in 2007

    Hello,

    I was recently sent an excel workbook that was created in excel 2003 and has been converted by a user to 2007. However non of the macro's that were created for several button work. As soon as you click on the macro button it throw an error asking to debug the code. Has anyone seen this before or come across a fix other then rebuilding the macro's completely.

    If anyone wants to see this awesome macro button please let me know i'll post the code.

    thanks in advance.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Running Macro's created in 2003 in 2007

    Yes please post the offending code.

    Does the file utilise a calendar control ?
    If you go into the VB Editor in 2007 and go to Tools -> References is anything listed as MISSING ?
    (I used CAPS as it will be listed in CAPS on the screen... I'm not shouting ;-)

    There's not much in the way of VBA that's not available in 2007 that was available in 2003 ...
    the UI is obviously a little different so trying to alter that using old methods is unlikely to work

  3. #3
    Registered User
    Join Date
    08-29-2008
    Location
    BlueBell
    Posts
    14

    Re: Running Macro's created in 2003 in 2007

    Please Login or Register  to view this content.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Running Macro's created in 2003 in 2007

    Are you able to post the file itself ?

  5. #5
    Registered User
    Join Date
    08-29-2008
    Location
    BlueBell
    Posts
    14

    Re: Running Macro's created in 2003 in 2007

    I am unable to post the file itself. Sorry

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Running Macro's created in 2003 in 2007

    In which case there's not a lot I can do sorry...

    I would suggest when the error arises you hit debug and see the code in yellow - this will point you in the direction of the cause...

    What I will say is that there appears to be a lot of superfluous code in the routine ... of more interest to you will be the various Offset commands which could easily cause bugs pending the active cell at point of code being executed... for ex. just looking at the first few lines, the below (line 3):

    Please Login or Register  to view this content.
    Will cause a bug if the active cell is anywhere in the first six rows when the code is invoked given you can not offset by more than 5 rows in an upwards direction (else you're moving off the workheet... ie to row 0 and under which don't exist).

+ 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