Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - HaroldRobbins

Pages: [1]
Automation Interface, Add-Ins and Tools / Problem scripting Color Selector
« on: November 09, 2016, 03:13:58 am »
I'm writing a VB DiagramScript to programmatically add lines to a diagram.  I would hate to hard-code the color of the diagramlink, so I'd thought to use a color dialog.

Since it wasn't included in the VBScript-Dialog library, I created my own routine:
Code: [Select]
function GetColor()
' Create new CommonDialog object
dim colorDialog
set colorDialog = CreateObject("MSComDlg.CommonDialog") '<== Fails here

GetColor = colorDialog.Color
end function

It's failing on the CreateObject line with "ActiveX component can't create object: 'MSComDlg.CommonDialog'".
Any idea what I'm doing wrong?

Thanks in advance,
Buddy Robbins

Pages: [1]