OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18-06-2012, 07:39
noj noj is offline
Member
 
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:
Code:
Private Sub GlobalMacroStorage_SelectionChange()
     Dim s As Shape
     Set s = ActiveSelection
     If s.PowerClip Is Nothing Then
          UserForm1.CheckBox1.Visible = False
     Else
          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 07:53.
Reply With Quote
  #2  
Old 18-06-2012, 10:40
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
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:
Code:
Set s = ActiveSelection
to
Code:
Set s = ActiveShape
and I bet it will work,

-Shelby
Reply With Quote
  #3  
Old 19-06-2012, 10:46
noj noj is offline
Member
 
Join Date: Oct 2011
Location: Sydney
Posts: 31
Default

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


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 13:37
Rotation and PowerClip Craig Tucker CorelDRAW/Corel DESIGNER VBA 3 23-08-2007 16:31
CorelDRAW X3 VBA Code - Shape & Color LIster JudyHNM Code Critique 2 05-04-2007 14:02
powerclip extract zaum CorelDRAW/Corel DESIGNER VBA 2 26-10-2005 07:26
Howto uniquely identify a shape in VBA code jemmyell CorelDRAW/Corel DESIGNER VBA 9 11-02-2005 21:05


All times are GMT -5. The time now is 03:06.


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