Here are the 3 ways I know about
Option Explicit
Public Declare Function acedSetColorDialog Lib "acad.exe" (color As Long, ByVal bAllowMetaColor As Boolean, ByVal nCurLayerColor As Long) As Boolean
Sub test()
Dim lngInitClr As Long
Dim blnMetaColor As Boolean
Dim lngCurClr As Long
On Error Resume Next
If acedSetColorDialog(lngInitClr, blnMetaColor, lngCurClr) Then
MsgBox lngInitClr
End If
End Sub
Public Function ColorDialog() As Integer
Dim intVariable As Integer
If Connect Then
objAcad.Application.WindowState = acMin
'calls the acad color dialog and returns
'the index of the color selected or -1 if cancelled
'store current sysvar value
intVariable = ThisDrawing1.GetVariable("USERI5")
'call color dialog
ThisDrawing1.SendCommand ("(setq clr (acad_colordlg 1))" & vbCr)
ThisDrawing1.SendCommand ("(if (= clr nil)" & _
"(setvar ""USERI5"" -1)" & _
"(setvar ""USERI5"" clr))" & vbCr)
ColorDialog = ThisDrawing1.GetVariable("USERI5")
'reset sysvar
ThisDrawing1.SetVariable "USERI5", intVariable
End If
Fred Castillo