Consulting

Results 1 to 9 of 9

Thread: Major problem with Macros -Powerpoint update?

  1. #1
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location

    Major problem with Macros -Powerpoint update?

    I am having a huge problem right now, all of the PPT programs I have written are no longer running on my or my client's machines, I am guessing due to a recent PowerPoint 2007 update. I get the message "Object Library invalid or contains references to object definitions that could not be found" when I try to run them, and it highlights a function definition (it is highlighting the entire parameter list:
    [vba]
    Private Function GetSettingsDialog(ByRef useTemplate As Boolean, _
    ByRef pullDataIntoMaster As Boolean, _
    Optional ByVal yearQuarterKey As Integer = 0, _
    Optional ByVal offsetValue As Integer = 0, _
    Optional ByRef fileToClose As PowerPoint.Presentation = Nothing, _
    Optional ByVal INONumber As String = "", _
    Optional ByVal Version As Integer = 0, _
    Optional ByVal Revision As Integer = 0)
    [/vba]
    The only parameter that is not a simple datatype is PowerPoint.Presentation. If I take that line out, it highlights a different function call and highlights a boolean constant used as a default for that parameter.

    Does anyone know if there was a recent update to Office/Powerpoint which is causing problems?

    I'll post more if I make any progress in detailing where the issue is, but I'm at the 'tearing my hair out' stage right now.

    EDIT - IT doesn't seem to be that function call specifically - if I copy that function call into a blank document, it causes no errors.

    Is there any way to determine which library might be the cause of the issue?
    Last edited by Cosmo; 05-07-2012 at 04:16 PM.

  2. #2
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    I checked on my other PC, and the files run properly, it looks like it is the update - that machine has version:
    12.0.6548.5000 SP2 MSO (12.0.6545.5004)

    The trouble machine has version
    12.0.6654.5000 SP3 MSO (12.0.6607.1000)

    I can't tell our clients to remove the update, I need to find a way to fix this issue, but I am helpless - I tried changing the variable in the parameter from 'PowerPoint.Presentation' to 'Variant', and it no longer highlighted that section, but continued with errors everywhere else.


    I am so frustrated right now

  3. #3
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Ok, I traced the problem to a Progressbar control I am using on 2 of the userforms. I removed it along with commenting out the lines which reference it, and now everything works properly.

    Not sure why that control is no longer working, I'll have to look into it further once I calm down a little, and have the time to investigate.

    Edit - I went to test the progressbar on a blank document, and once I add the control to toolbox ("Microsoft ProgressBar Control, version 6" in the menu), it won't let me drag it onto the form, and I get a 'Element not found' if I try to click and drag to create a new control.

    Looks to me like Microsoft *****ed that up, if anyone else can confirm I'd be interested in knowing if it is indeed a bug.
    Last edited by Cosmo; 05-07-2012 at 06:42 PM.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    It works here and I have the same version as your troublesome Pc

    12.0.6654.5000 SP3 MSO (12.0.6607.1000)

    If you select it in Additional controls does it show the ocx location?

    It is usually at C:\Windows\system32\MSCOMCTL.OCX
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by John Wilson
    It works here and I have the same version as your troublesome Pc

    12.0.6654.5000 SP3 MSO (12.0.6607.1000)

    If you select it in Additional controls does it show the ocx location?

    It is usually at C:\Windows\system32\MSCOMCTL.OCX
    That's odd, it doesn't work on any of the computers I have tried that have the update, and since our client encountered the issue first, I am assuming that their computers are the same.

    The path for the control in my system is slightly different:
    C:\Windows\SysWOW64\MSCOMCTL.OCX

    What OS are you running? I'm using Windows 7. The PC which doesn't have the issue is running XP, and has the SP2 patch. Is it possible it could be a system update instead of (or in conjunction with) an Office update? Is it only an issue with 64-bit version of Windows?

  6. #6
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    I just tested on another machine with the same settings (64-bit Windows 7, PPT SP3) and it does run on that machine. The path for the control is the same as on my problem PC (and on that one, there's also a version 5 of the control)

    Now I'm stumped as to where to look to determine what is causing the issue.

  7. #7
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    OK so it doesn't seem to be available on our 64 bit Office on Windows 7. That's not surprising as it's a 32 bit control.

    If you have 32 bit Office on 64 bit windows SYSWOW64 is where I would expect it to be.

    You might have to re register it with regsvr32

    In a run box type REGSVR32 MSCOMCTRL.OCX

    You might need

    REGSVR32 "C:\WINDOWS\SYSWOW64\MSCOMCTL.OCX"

    There's also a thread here which might shed more light
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  8. #8
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Thanks for the update, I'll look into that. I don't want to mess up (or fix for that matter) my main machine, so I'll have to wait until I can get access to one of our tech guy's extra machines. I'll also see if he can check with Microsoft to see if they can shed any light on this issue.

    I wasn't aware that one of the machines it was having a problem on was running XP, (I don't see a label to say whether it is 32 or 64 bit - was XP available in 64 bit?) so it may not be a 64 bit issue.

    For now, the fix is pretty simple - I removed the progressbars from the program (since their functionality doesn't actually affect the program; the user just has to deal with waiting without any indication about the process' progress), but I now have to do that for 3-4 programs that have been distributed to the clients sales force in case the issue occurs with any of them.

    I again thank you for your time, you are always a huge boost to both my work and my sanity.

  9. #9
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    XP was available in 64 bit but it's not common.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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