OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   Why can't I get an 6? (http://forum.oberonplace.com/showthread.php?t=6972)

runflacruiser 14-05-2010 14:56

Why can't I get an 6?
Any ideas? This should give an 6 when clicking on a text shape...right?


Private Sub cmdBeginChooseExcludes_Click()

Dim s As Shape
Dim x As Double, y As Double, Shift As Long, b As Boolean

b = False
 While Not b
  b = ActiveDocument.GetUserClick(x, y, Shift, 10, False, cdrCursorEyeDrop)
    If Not b Then
        Set s = ActivePage.SelectShapesAtPoint(x, y, False)
        MsgBox ActiveSelection.Type
        If s.Shapes.Count > 0 Then MsgBox "more than 1"
    End If

End Sub


runflacruiser 14-05-2010 18:35

Fixed it by making sure selectionShape(which is returned by selectShapesAtPoint was 1 item and if so then converting to activeShape which can return a type property.

Learning is great!

All times are GMT -5. The time now is 07:10.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com