Johnny C
Well-known Member
- Joined
- Nov 7, 2006
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
Hi
I've got a weird problem. I've got code to connect 2 shapes with an elbow connector using a function with start and end shape as parameters.
Both shapes exist and the first time it connects them it works ok. The second time it tries to add a connector (it doesn't matter if there's multiple connectors connecting the 2 shapes) it crashes with this error and highlights the line above:
When I debug however and press F8 it steps into the function and the function works fine, it's the assignation of the shape the function returns that causes the problem.
I can get around it with an On Error Resume Next but I want to know why it's crashing.
I've got a weird problem. I've got code to connect 2 shapes with an elbow connector using a function with start and end shape as parameters.
Code:
Dim conlink as Shape
...other code
conLink = AddElbowConnector(shpSourceSheetShape, shpTargetSheetShape)
Code:
Run time error 91: Object variable or With block variable not set.
I can get around it with an On Error Resume Next but I want to know why it's crashing.