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 16-08-2010, 09:27
nic nic is offline
Member
 
Join Date: May 2009
Posts: 90
Default Changing Palettes

Hi

Im using X5 and have about 20 palettes which Ive named 01 to 20 and am trying to find a way of looping thru them to create 20 images which have the same shapes but are coloured differently based upon the palettes.

I have tried recording a macro but dont see any reference to palettes in the macro. Is it possible and if so would somebody mind helping ?

thanks
nic
Reply With Quote
  #2  
Old 16-08-2010, 10:24
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
You can loop palettes like this:

Code:
Sub palLoop()


Dim pal As Palette

    For Each pal In Palettes
        'do some thing with palette
    Next pal

End Sub
-John
Reply With Quote
  #3  
Old 16-08-2010, 10:29
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
I haven't tested but this might help too:

Code:
Sub palLoop2()


Dim pal As Palette, i As Variant, myStr As String

    For i = 1 To 20
        If CStr(Len(i)) = 1 Then i = "0" & i
        Palettes(i).Open
    Next i

End Sub
-John
Reply With Quote
  #4  
Old 19-08-2010, 20:16
nic nic is offline
Member
 
Join Date: May 2009
Posts: 90
Default thanks

thanks again
n
Reply With Quote
Reply

Tags
palette


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
Palettes issues in X5 biok CorelDRAW/Corel DESIGNER VBA 2 19-05-2010 13:08
Why do all of my palettes contain dups according to this? runflacruiser CorelDRAW/Corel DESIGNER VBA 3 24-03-2010 20:09
Color Palettes? masterchiefph CorelDRAW/Corel DESIGNER VBA 0 12-07-2007 22:18
Custom Palettes via VBA ddonnahoe CorelDRAW/Corel DESIGNER VBA 7 13-11-2006 08:53
Temporary palettes CORNMEN CorelDRAW/Corel DESIGNER VBA 2 10-07-2003 21:27


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


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