ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Value From xlDialog (https://www.excelbanter.com/excel-programming/330569-value-xldialog.html)

Brad

Value From xlDialog
 
Thanks for taking the time to read my question.

How do I get the value of the selected option when I use this?

- - - - - - - -
Application.Dialogs(xlDialogPatterns).Show
- - - - - - - -

Say I choose red, what it that value?

Thanks,

Brad

Gary Brown

Value From xlDialog
 
Quoting from Tom Ogilvy:
"The dialog is the same as selecting this from the menu - it performs a
specific action which is to color the cells that are selected. It isn't a
general purpose dialog that you can use as a color picker. So the answer is
no as far as any builtin in capability you can employ to do this."

However, If you color the selection, you can get that information from the
selection...
'/=======================================/
Sub test()
MsgBox "Background color: " & Selection.Interior.ColorIndex
MsgBox "Font color: " & Selection.Font.ColorIndex
End Sub
'/=======================================/

HTH,
--
Gary Brown

Please rate this posting if it is helpful to you.

"Brad" wrote:

Thanks for taking the time to read my question.

How do I get the value of the selected option when I use this?

- - - - - - - -
Application.Dialogs(xlDialogPatterns).Show
- - - - - - - -

Say I choose red, what it that value?

Thanks,

Brad



All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com