I am unable to replicate the error on my machine. The other developer I'm working with cannot replicate on his machine either. We are able to isolate the error on a user's machine, though. I am running Win 7 Enterprise Version 6.1 Build 7600, with MS Office 2010/PowerPoint 2010/etc.

The relevant error occurs for one user on the .Line.Visible = msoFalse. The error raises as:

This subroutine is wrapped in a master error handler from a form button-click event, so we do not lose data or crash the application, but it does prevent the Add-In from building the chart/graphic in the desired manner.

Since the default .Line.VisibleismsoFalse (so I can comment out the offending lines of code) this is not particularly critical, but it does require a code change and redistribution of the PPAM.

I am wondering why this is happening, and whether there is a way to "fix" this that does not involve commenting out the offending lines, or doing an On Error Resume Next approach.

Update (from comments, to clarify)

This example is one of several such subroutines designed to handle the placement and formatting of textbox callouts, these are all shapes of type msoTextBox which are added within the shapes collection of an existing shape, e.g., a Chart shape.

All similar calls to object.Line.Visible = msoFalse fail with the same error.

, each will raise the same error on her machine. Other similar calls, e.g., .MajorGridlines.format.Line.Visible = msoFalse does not error.

the point worth mentioning here is that, for me, what's happening is it is throwing "Method 'Visible' of object 'LineFormat' failed" error, but it does remove the line before throwing this error. pretty strange. But in such a scenario, if I put On Error Resume Next for this line and the resume error handing after this line is working fine for me. I am not sure about the reason though.
–
VikasSep 10 '13 at 16:18

@David, not the VBA Code line. Lol. What I meant is, I set the Visible Property to true, it brought the line in the textbox. When I tried .Visible=false, it gave me the error, but the line from Shape was also removed. So if I suppress the error by using on error resume next, my code works just fine.
–
VikasSep 11 '13 at 13:47

1

I don't think Patrick7 meant for the user to do this; it's something you'd do in your source PPTX file before saving again as PPAM. Since it occurs only on this one user's PC, I'd also check to see what .Build the PPT application reports. Charts and tables got badly broken in PPT 2007 and have been mostly patched back up moving forward, but there may still be some glitches in older versions that newer versions/updates patch away.
–
Steve RindsbergSep 11 '13 at 15:27

1

In addition to the logging, I'd look at their windows/office update history; see if anything showed up at about the same time as the errors started to occur. MS pushes out bad updates from time to time, stuff that causes odd problems like this.
–
Steve RindsbergSep 12 '13 at 14:11

1 Answer
1

This is not exactly a satisfactory answer, but I avoid the error simply by commenting out the offending line(s) of code. Since, when the TextBox is created, this property is already set to msoFalse, it is redundant code and can be omitted.