Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Special characters in shortcut menus

I am using Office 2003 on Windows XP.

Does anyone have or know where I can find a listing of special characters
that can appear in a shortcut menu (in the menu item text, not the icon) ?

I am presuming this would be a list of characters that may appear in the VBE
as the character itself, not a question mark? Or is there a way to make any
special character appear in a shortcut menu - such as delta - ? If so, how?

Thanks much for your assistance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Special characters in shortcut menus

XP,

This is kind of crude but seems to do the job. It creates a shortcut bar
and for the UniCode characters 1 to 65536 it attempts to make them the
caption of the shortcut bar. If setting the character as the caption
doesn't cause an error it prints the char in row i, column 1 of the active
spreadsheet - so make sure your activesheeet is blank when you run this.
Many of the chars don't error but are unprintable. This macro takes a while,
but it shows you what number char your up to in the status bar. (I found
the ChrW function which supports UniCode chars from 1 to 65536, but only on
a Windows machine. If you don't want UniCode chars then just use the Chr
function, and change the upper limit of the for loop to 255.)

Sub test()
Dim cbar As CommandBar
Dim cbarbutton As CommandBarButton
Dim i As Long

Application.ScreenUpdating = False
Set cbar = CommandBars.Add()
With cbar
.Visible = True
.Enabled = True
End With

Set cbarbutton = cbar.Controls.Add
With cbarbutton
.Style = msoButtonIconAndCaption
For i = 1 To 65536
If i Mod 100 = 0 Then
Application.StatusBar = i
End If
On Error Resume Next
.Caption = ChrW(i)
If Err = 0 Then
ActiveSheet.Cells(i, 1) = .Caption
End If
On Error GoTo 0
Next i
End With
Application.StatusBar = False
cbar.Delete
Application.ScreenUpdating = True
End Sub

--
hth,

Doug

"XP" wrote in message
...
I am using Office 2003 on Windows XP.

Does anyone have or know where I can find a listing of special characters
that can appear in a shortcut menu (in the menu item text, not the icon) ?

I am presuming this would be a list of characters that may appear in the
VBE
as the character itself, not a question mark? Or is there a way to make
any
special character appear in a shortcut menu - such as delta - ? If so,
how?

Thanks much for your assistance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Special characters in shortcut menus

Thanks much Doug!

"Doug Glancy" wrote:

XP,

This is kind of crude but seems to do the job. It creates a shortcut bar
and for the UniCode characters 1 to 65536 it attempts to make them the
caption of the shortcut bar. If setting the character as the caption
doesn't cause an error it prints the char in row i, column 1 of the active
spreadsheet - so make sure your activesheeet is blank when you run this.
Many of the chars don't error but are unprintable. This macro takes a while,
but it shows you what number char your up to in the status bar. (I found
the ChrW function which supports UniCode chars from 1 to 65536, but only on
a Windows machine. If you don't want UniCode chars then just use the Chr
function, and change the upper limit of the for loop to 255.)

Sub test()
Dim cbar As CommandBar
Dim cbarbutton As CommandBarButton
Dim i As Long

Application.ScreenUpdating = False
Set cbar = CommandBars.Add()
With cbar
.Visible = True
.Enabled = True
End With

Set cbarbutton = cbar.Controls.Add
With cbarbutton
.Style = msoButtonIconAndCaption
For i = 1 To 65536
If i Mod 100 = 0 Then
Application.StatusBar = i
End If
On Error Resume Next
.Caption = ChrW(i)
If Err = 0 Then
ActiveSheet.Cells(i, 1) = .Caption
End If
On Error GoTo 0
Next i
End With
Application.StatusBar = False
cbar.Delete
Application.ScreenUpdating = True
End Sub

--
hth,

Doug

"XP" wrote in message
...
I am using Office 2003 on Windows XP.

Does anyone have or know where I can find a listing of special characters
that can appear in a shortcut menu (in the menu item text, not the icon) ?

I am presuming this would be a list of characters that may appear in the
VBE
as the character itself, not a question mark? Or is there a way to make
any
special character appear in a shortcut menu - such as delta - ? If so,
how?

Thanks much for your assistance.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Special characters in shortcut menus

XP,

You're welcome.

One change. The commandbars.add line should be:

Set cbarbutton = cbar.Controls.Add(temporary:=True)

Without the "Temporary := True" you'll end up with one Custom toolbar for
each time you run it. You can delete them in the Customize -- Toolbars
dialog.

Doug

"XP" wrote in message
...
Thanks much Doug!

"Doug Glancy" wrote:

XP,

This is kind of crude but seems to do the job. It creates a shortcut bar
and for the UniCode characters 1 to 65536 it attempts to make them the
caption of the shortcut bar. If setting the character as the caption
doesn't cause an error it prints the char in row i, column 1 of the
active
spreadsheet - so make sure your activesheeet is blank when you run this.
Many of the chars don't error but are unprintable. This macro takes a
while,
but it shows you what number char your up to in the status bar. (I found
the ChrW function which supports UniCode chars from 1 to 65536, but only
on
a Windows machine. If you don't want UniCode chars then just use the Chr
function, and change the upper limit of the for loop to 255.)

Sub test()
Dim cbar As CommandBar
Dim cbarbutton As CommandBarButton
Dim i As Long

Application.ScreenUpdating = False
Set cbar = CommandBars.Add()
With cbar
.Visible = True
.Enabled = True
End With

Set cbarbutton = cbar.Controls.Add
With cbarbutton
.Style = msoButtonIconAndCaption
For i = 1 To 65536
If i Mod 100 = 0 Then
Application.StatusBar = i
End If
On Error Resume Next
.Caption = ChrW(i)
If Err = 0 Then
ActiveSheet.Cells(i, 1) = .Caption
End If
On Error GoTo 0
Next i
End With
Application.StatusBar = False
cbar.Delete
Application.ScreenUpdating = True
End Sub

--
hth,

Doug

"XP" wrote in message
...
I am using Office 2003 on Windows XP.

Does anyone have or know where I can find a listing of special
characters
that can appear in a shortcut menu (in the menu item text, not the
icon) ?

I am presuming this would be a list of characters that may appear in
the
VBE
as the character itself, not a question mark? Or is there a way to make
any
special character appear in a shortcut menu - such as delta - ? If so,
how?

Thanks much for your assistance.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Office Paste Special Shortcut MS Office Guru Excel Discussion (Misc queries) 3 May 10th 07 03:58 PM
shortcut for paste special? nastech Excel Discussion (Misc queries) 17 April 20th 07 04:24 PM
whats the shortcut key for paste special samu Excel Discussion (Misc queries) 2 March 24th 07 03:54 PM
Disable Shortcut Menus / Alt-F8 Peter Rooney Excel Programming 2 August 12th 05 02:17 PM
Shortcut for Paste Special Values tod Excel Programming 0 November 20th 03 05:26 PM


All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"