Tuesday, April 01, 2008

VBA - Check to See If Alignment Isn't Assigned To Pipe

This is just a quick reminder on how to check to see if an alignment is assigned to a pipe.

If oPipeRef.Alignment Is Nothing Then
' Just a default name that hopefully nobody will use.
dPipeNameRef = "GiberishAlignmentNameDontNameItThis"
dPipeNameRef = oPipeRef.Alignment.Name
End If

If the alignment isn't assigned and you assign the value of the name an error is generated. You can ignore the error, but it may cause problems.

No comments:


Blog Widget by LinkWithin