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 13:56

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

Code:

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)
        s.CreateSelection
        MsgBox ActiveSelection.Type
        If s.Shapes.Count > 0 Then MsgBox "more than 1"
    End If
 Wend

End Sub

-John

runflacruiser 14-05-2010 17:35

Hi.
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!
-John


All times are GMT -5. The time now is 12:56.

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