• VBA Not working (2007)

    Author
    Topic
    #457053

    Recently upgraded to 2007. Have found that some of the VBA coding from Excel XP does not function in 2007.Do I have to do a bunch of re-coding (ugh) or is there a simpler method to convert the XP workbooks to operate properly in 2007? thanks.

    Viewing 1 reply thread
    Author
    Replies
    • #1144690

      Some of the common scenarios around your question are:

      1. VBA is not installed when the person upgraded to 2007. In this case, the VB button on the Developer tab is greyed out! (I doubt this is your problem)
      2. Security settings are preventing the code from running. Ensure that you have responded to the prompt to allow the code to run, and check that the code is not being blocked because it is not from a trusted location or publisher.
      3. If both above are OK, then maybe the code is debugging as due to objects or properties/methods that have changed. In this event, the code will need to be edited to correct the incompatible lines.

      If none of the above apply in your case, could you please supply us a snippet of the code that is causing the problem. It will help us to evaluate what is happening and provide a solution.

      PS: Are you able to step through the code. Is it running some of the code and then stopping?

    • #1144694

      Have you got some examples of lines that fail?

      • #1144777

        The spreadsheet is attached. The code I found on the web. It worked fine in XP and 2000. As you can see you are to click on a cell in Col A and a pop-up calendar should appear. I have allowed macros to run. When I attempt to run it I get Compile Error: Can’t find project or library.

        • #1144780

          If you go to VBA and check tools – references are there any listed as missing?
          Is there a similarly named one in the list that you can check? I can not not check (I don;t have XL2007) but it may have updated libraries or one did not get installed

          Steve

        • #1144787

          Your file uses the calendar control, which is not a native part of every Office installation to begin with. On my Office 2007 the file works fine, so I seem to have the control (Office 2007 Ultimate).
          Like Steve said: check Tools, references in the VBA editor and see if the calendar control is marked as “MISSING”. You CAN download the calendar control from Microsoft though.

    Viewing 1 reply thread
    Reply To: VBA Not working (2007)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: