OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27-02-2014, 11:00
byteme67's Avatar
byteme67 byteme67 is offline
Junior Member
 
Join Date: Apr 2010
Location: Fort Misery
Posts: 25
Default Open/close color palettes with vba user form

Okay I know in the later versions of CD that you can open the docker attach it and open and close the palettes from there. But I have created a userform using radio buttons to quickly select the palettes I want open or closed. e.g. I want just my Spot Color palettes open when I want to create something using the spot color palettes. Or CMYK palettes when creating something with CMYK colors.
But here is where I am at a loss. I have a checkbox on the user form that allows me to either keep the Document Palette open or closed. I cannot figure out how to correctly code this.
Also if anyone can give me advice on how to code it better it is always appreciated.
Here is the raw code and the userform is attached.
Code:
Private Sub CheckBox1_Click()
    
    'Palettes.Open "C:\Program Files\Corel\CorelDRAW Graphics Suite X6\Color\Palettes\dynamic.xml"
    LoadPalette = "Document Palette"
    
End Sub

Private Sub CommandButton1_Click()
    
    Unload frmColorPal
    
End Sub
Private Sub optPalsClose_click()

    Dim pal As Palette
    
    For Each pal In Palettes
        pal.Close
    Next pal

End Sub
Private Sub optCMYKcolors_click()

    Call optPalsClose_click
    
    'load the CMYK color palettes
    With Palettes
        .Open "C:\Program Files\Corel\CorelDRAW Graphics Suite X6\Color\Palettes\Process\trumatch.xml"
        .Open "C:\Program Files\Corel\CorelDRAW Graphics Suite X6\Color\Palettes\defcmyk.xml"
        .Open "C:\Program Files\Corel\CorelDRAW Graphics Suite X6\Color\Palettes\defrgb.xml"
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\My CMYKs\Xerox 7750.xml"
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\My CMYKs\NewCMYKs.xml"
    End With
    
'   Palette.Default "Xerox 7750.cpl"

End Sub
Private Sub optPalsBlk_click()

    Call optPalsClose_click

    'load just the black with screen palette
    Palettes.Open "C:\Documents and Settings\Rob\My Documents\My Palettes\My Spots\Black (screened).xml"
End Sub
Private Sub optPalsPMScolors_click()

    Call optPalsClose_click

    'load all standard PMS colors palettes
    With Palettes
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\My Spots\StdColors.xml"
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\My Spots\StdLight.xml"
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\My Spots\StdMetallic.xml"
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\My Spots\Black (screened).xml"
    End With
End Sub
Private Sub optBCEcolors_click()

    Call optPalsClose_click
    
    'load BCE standard colors
    With Palettes
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\BCE\24 Hour.xml"
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\BCE\48 Hour Standard.xml"
    End With
    
End Sub

Private Sub optLabelArt_click()

    Call optPalsClose_click
    
    'load BCE standard colors
    With Palettes
        .Open "C:\Documents and Settings\Rob\My Documents\My Palettes\LabelArt\Standard Colors.xml"
    End With

End Sub
Attached Files
File Type: zip frmColorPal.zip (1.9 KB, 923 views)
Reply With Quote
Reply

Tags
color, palette, radio button, userform


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
Help with User Form katruax CorelDRAW/Corel DESIGNER VBA 1 02-05-2012 01:26
Close form by mouse moving shark Macros/Add-ons 2 22-11-2011 01:14
Best way to Close a form RobC CorelDRAW/Corel DESIGNER VBA 2 19-09-2009 01:30
Color Palettes? masterchiefph CorelDRAW/Corel DESIGNER VBA 0 12-07-2007 21:18
Open form when i open my template diltech CorelDRAW/Corel DESIGNER VBA 1 10-01-2005 16:46


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


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