BuiltIn Dialog Boxes

HighAndWilder

Well-known Member
Joined
Nov 4, 2006
Messages
712
Office Version
  1. 365
Platform
  1. Windows
Hi

I'd like to load Excel BuiltIn Dialog Boxes by using the following line of code or similar and where the strDialogBox variable contains the
name of the Dialog Box to load.

strDialogBox="xlDialogFontProperties"

Application.Dialogs(strDialogBox).Show

How would I do this?

I'd like to open the Format Cells Dialog Box but I'm not sure which one it is. I'd like to be able to select a certain Tab on the Dialog Box, e.g. Fill or Font.

Any ideas anybody?

Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Errant post
 
Last edited:
Upvote 0
Perhaps I am not understanding, but is this what you are looking for. It seems like you have it already...

Both of these will open the Format Cells Font Dialog box.

Code:
Dim strDialogBox
strDialogBox = xlDialogFontProperties
Application.Dialogs(strDialogBox).Show

or

Code:
Application.CommandBars.ExecuteMso ("FormatCellsFontDialog")
 
Last edited:
Upvote 0
I am getting a 'Type Mismatch' error with this

Application.Dialogs(strDialogBox).Show

and an 'Invalid Procedure Call Or Argument' error with this

Application.CommandBars.ExecuteMso (strDialogBox)
 
Upvote 0
and an 'Invalid Procedure Call Or Argument' error with this

Application.CommandBars.ExecuteMso (strDialogBox)

Also, if you look closely this command did not use your variable "strDialogBox" but rather "FormatCellsFontDialog"
 
Upvote 0
It is this that works :

Application.CommandBars.ExecuteMso "FormatCellsFontDialog"


I also found this page that just so happens to be on dummies.com!!!

https://www.dummies.com/software/mi...to-display-excel-2016s-built-in-dialog-boxes/

I quote from the web page :

Virtually every command available in Excel is listed in the left panel. Find the command you need and hover your mouse over it, and you
see its secret command name in the tooltip (it’s the part in parentheses).


Whilst I can find out the 'secret command name' by hovering over the command I would much rather find a narrated list by Microsoft.

Does anybody know if one exists?

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,885
Messages
6,181,586
Members
453,055
Latest member
cope7895

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top