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 09-03-2004, 14:28
jdugan
Guest
 
Posts: n/a
Default GlobalMacroStorage_SelectionChange()

I wrote a macro in CorelDraw 11 that would display the selected objects height and width in feet and inches (ie 2'-4 3/8"). I was using the "GlobalDocument_SelectionChanged" event, but now in CorelDraw 12 when I try to use "GlobalMacroStorage_SelectionChange()" in the "ThisMacroStorage" module it goes into some kind of infinite loop. Plus the procedures list box for "ThisMacroStorage" module in the editor behaves strangely.
Reply With Quote
  #2  
Old 09-03-2004, 14:44
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: GlobalMacroStorage_SelectionChange()

Please show me your event handler.
Reply With Quote
  #3  
Old 09-03-2004, 15:14
jdugan
Guest
 
Posts: n/a
Default GlobalMacroStorage_SelectionChange()

Private Sub globalmacrostorage_selectionchange()

End Sub
Reply With Quote
  #4  
Old 09-03-2004, 17:51
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: GlobalMacroStorage_SelectionChange()

So, it's empty?

Works fine here. Unless you do something that changes the selection within the event handler, which could trigger infinite "loop". But as soon as you just get some selection information, there should be no problem.
Reply With Quote
  #5  
Old 09-03-2004, 19:17
jdugan
Guest
 
Posts: n/a
Default GlobalMacroStorage_SelectionChange()

Now I feel stupid. I was testing it with a Msgbox which was changing the focus. It works fine now, thanks for you help.
Reply With Quote
  #6  
Old 09-03-2004, 20:18
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: GlobalMacroStorage_SelectionChange()

The safest way to test the results of events is to use Debug.Print which will output the result to the Immediate window in the VBA editor.

Code:
Private Sub GlobalMacroStorage_SelectionChange()
    Debug.Print "Object Selected = " & ActiveSelection.Shapes.Count
End Sub
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


All times are GMT -5. The time now is 05:46.


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