OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 18-06-2012, 08:39
noj noj is offline
Join Date: Oct 2011
Location: Sydney
Posts: 31
Default Code to determine if shape is powerclip

I'm going nuts! Can someone please tell me the simplest way to determine if a selected shape is a powerclip or not with VBA code? Based on a thread I found in this forum that Shelby answered, I tried this method:
Private Sub GlobalMacroStorage_SelectionChange()
     Dim s As Shape
     Set s = ActiveSelection
     If s.PowerClip Is Nothing Then
          UserForm1.CheckBox1.Visible = False
          UserForm1.CheckBox1.Visible = True
     End If
End Sub
... but it's not working. Am I missing something?

Last edited by noj; 18-06-2012 at 08:53.
Reply With Quote
Old 18-06-2012, 11:40
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,788
Blog Entries: 12
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default ActiveSelection

You need to be careful when using ActiveSelection, because it returns the selection type and not the shape itself.

Trying changing:
Set s = ActiveSelection
Set s = ActiveShape
and I bet it will work,

Reply With Quote
Old 19-06-2012, 11:46
noj noj is offline
Join Date: Oct 2011
Location: Sydney
Posts: 31

Great, thanks shelby. That's better.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fountain to bitmap in powerclip grzjanik Macros/Add-ons 15 08-09-2011 14:37
Rotation and PowerClip Craig Tucker CorelDRAW/Corel DESIGNER VBA 3 23-08-2007 17:31
CorelDRAW X3 VBA Code - Shape & Color LIster JudyHNM Code Critique 2 05-04-2007 15:02
powerclip extract zaum CorelDRAW/Corel DESIGNER VBA 2 26-10-2005 08:26
Howto uniquely identify a shape in VBA code jemmyell CorelDRAW/Corel DESIGNER VBA 9 11-02-2005 22:05

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

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