I'm using Excel 2013 and the line of code I'm having trouble with is:
If Application.Dialogs(xlDialogEditColor).Show(10, 0, 125, 125) = True Then
The code is in an Addin and it works great if there's a regular workbook open but if there isn't one, I get the error:
Run-time error '1004':
Unable to get the Show property of the Dialog class.
I find that I get this same error if I use Application.Dialogs in some cases but don't get it in other cases like using the Open File dialog.
Anyone know why this is happening or if they have an idea for a workaround?
The reason I don't have a file open is because the Add-in loads a form and the color dialog is there to change the colors of the form.
If Application.Dialogs(xlDialogEditColor).Show(10, 0, 125, 125) = True Then
The code is in an Addin and it works great if there's a regular workbook open but if there isn't one, I get the error:
Run-time error '1004':
Unable to get the Show property of the Dialog class.
I find that I get this same error if I use Application.Dialogs in some cases but don't get it in other cases like using the Open File dialog.
Anyone know why this is happening or if they have an idea for a workaround?
The reason I don't have a file open is because the Add-in loads a form and the color dialog is there to change the colors of the form.