Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SendKeys not working with ComboBox? (Word 2002)

    Hi all,

    I have a ComboBox on my form, which when clicked, is supposed to display a dialog box and automatically select a couple of options. I am using SendKeys to do this. However, the SendKeys commands are being ignored. I have tested the same code with a CommandButton and it works fine.

    Any ideas?

    Here is the code:

    Private Sub cboNumber_Click()
    SendKeys "%M"
    Dialogs(wdDialogFormatStyle).Show
    End Sub

    Thanks in advance,

    Chis

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendKeys not working with ComboBox? (Word 2002)

    Let's see if we can't get you away from a Sendkeys solution...

    What does the Alt-M do on your form?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    New Lounger
    Join Date
    Jan 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendKeys not working with ComboBox? (Word 2002)

    Hi Kevin,

    Basically what I'm trying to do is display the 'Modify Style' window when a user clicks on the command button. The only way I can see to do that at the moment (unless anybody else can advise me differntly!), is to display the 'Format Style' window (wdDialogFormatStyle) and use SendKeys ("%m") to trigger the 'Modify' button.

    Alternative suggestions as to how I might display the 'Modify Style' window are much appreciated [img]/forums/images/smilies/smile.gif[/img]

    Thanks, Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •