Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Accelerator Keys

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GWizz - 27 Feb 2006 12:50 GMT
Have the following piece of code which reads in a file and populates a frame
with option buttons :-

   'Place the OptionButtons on the dialog box
   For intXXX = 0 To intButts - 1
       Set MyCmd = frMenu.Controls.Add("forms.OptionButton.1", True)
       MyCmd.Left = intXOffSet
       MyCmd.Top = intYOffSet + ((intXXX - 1) * intSpacing)
       MyCmd.Width = 300
       MyCmd.Height = 20
       MyCmd.Caption = strMenu(intXXX)
       MyCmd.Accelerator = strAccKey(intXXX)
       Debug.Print strMenu(intXXX), strAccKey(intXXX)
       If intXXX = 0 Then
           MyCmd.Value = True                'Sets default to OptBtn 1
       End If
   Next intXXX

Problem is the Accelerator Keys section doesn't work. No error messages or
anything, but they just don't show and don't activate either.

Anyone any ideas ?

Regards

>>=== GWizz ===<<
GWizz - 02 Mar 2006 16:02 GMT
Suffice it to say my file (the one that was read in) was formatted as follows

MenuOptionName, AcelleratorKeyCharacter, TemplateName

What i didn't realise was leaving the spaces after the column makes the
Accellerator keyy Character 2 characters and it only reads the first
character ie the space.

Regards
>>=== GWizz ===<<

> Have the following piece of code which reads in a file and populates a frame
> with option buttons :-
[quoted text clipped - 22 lines]
>
> >>=== GWizz ===<<
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.