Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access the Symbols Dialog Box, Common Dialog Control

Status
Not open for further replies.

JTBorton

Technical User
Jun 9, 2008
345
DE
I am trying to access the symbols dialog box so that my users can add greek letters and mathematical operators into a textbox. I have been having a little success using the commong dialog cntrol to change the fonts and colors of the text box with

Code:
dlgCommon.Flags = cdlCFScreenFonts
dlgCommon.FontName = txtRemarks.FontName
dlgCommon.FontBold = txtRemarks.FontBold
dlgCommon.FontItalic = txtRemarks.FontItalic
dlgCommon.FontSize = txtRemarks.FontSize
dlgCommon.ShowFont
txtRemarks.FontSize = dlgCommon.FontSize
txtRemarks.FontBold = dlgCommon.FontBold
txtRemarks.FontItalic = dlgCommon.FontItalic
txtRemarks.FontName = dlgCommon.FontName

So I thought I would try using the common dialog control with dlgCommon.ShowSymbols (I don't even know what flag to use...). I've tried Application.Dialogs(xlSymbols).show, but that doesnt really work either. I dont think the latter would help anyway because that seems to only change cells and not forms. Any hints?

-JTBorton
Another Day, Another Disaster
 
Right so here's what I've come to:
CommandBars.FindControl(ID:=308).Execute will display the symbols form and place the symbol in the active cell. I still haven't found a way to catch the symbol from the form so that I can place it directly in the text box, so I'll either have to place the symbol in an arbitrary set cell and then copy and clear it, or make my own symbols dialog. If anyone has any other idea's I'd love to hear them.

-JTBorton
Another Day, Another Disaster
 
You could use buttons to insert symbols. For instance the sigma (sum):
TextBox1.Text = TextBox1.Text & ChrW(931)
The codes are the same as in the 'insert synbol' dialog.

BTW, for me works too (undocumented):
Application.Dialogs(771).Show
to display the dialog.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top