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 14-03-2007, 03:27
fadimas
Guest
 
Posts: n/a
Default Evaluate an object name at runtime

I have a lot of checkboxes, textboxes and lists named CheckBox1 to CheckBox20, TextBox1 to TextBox20 and so on, all of them disabled by default. Before the form is runing, I select some shapes and with n=ActiveSelection.Shapes.Count I have the number of this, so, after that, I need to enabled n checkboxes from CheckBox1 to CheckBoxn and so on. It is a posibilitie to do anything like this:
for j=1 to 3
CheckBoxj.Enabled=True
next
In FoxPro the equivalent is:
for j=1 to 3
("CheckBox"+trim(str(j)+".Enabled")=True
next
and the FoxPro EVALUATE the string expresion between parenthesis AT THE RUNTIME and then run it.
I have CorelDraw 11and VBA

Last edited by fadimas; 14-03-2007 at 04:22.
Reply With Quote
  #2  
Old 14-03-2007, 04:38
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

Code:
Controls("CheckBox"+cstr(i)).Enabled=newValue
be sure to type prefix for controls name exactly, casesensitive
Reply With Quote
  #3  
Old 14-03-2007, 04:52
fadimas
Guest
 
Posts: n/a
Default Thanks

Thanks, You save a lot of My precious time
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
moving an object down in vba sifterbox CorelDRAW/Corel DESIGNER VBA 1 27-04-2006 14:40
How to select object inside another object jukos General 4 24-10-2005 21:27
Background to object Fine! But Object to Background - How? marian General 2 15-07-2005 03:51
Bounding lines around an object toy4mud CorelDRAW CS 2 04-11-2004 11:56
Sorting entries in the object manager dan CorelDRAW/Corel DESIGNER VBA 1 18-08-2004 22:16


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


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