Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Option Private Module and ShortCut Keys (XL97;SR2)

    If I declare Option Private Module in a module various sub routines are not displayed nor are they capable of being run or edited if viewed from Alt-F8.

    It also is apparent that none of the short cut keys will function with the Option Private Module in the module. Is there someway to enable the short cut keys?

    Thanks,
    John

  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: Option Private Module and ShortCut Keys (XL97;SR2)

    I have not tested this, but how about creating a dummy sub that contains a call to the hidden mod. Assign the short-cut key to the dummy sub.
    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
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Option Private Module and ShortCut Keys (XL97;SR2)

    In XL2000 this works:

    Option Private Module


    Private Sub activate()
    Application.OnKey "^a", "Test"
    End Sub

    Private Sub test()
    MsgBox "hi"
    End Sub

    Private Sub deactivate()
    Application.OnKey "^a"
    End Sub

    Run the first sub and control-a will show the msgbox.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Option Private Module and ShortCut Keys (XL97;SR2)

    Works like a charm.

    Thanks once again.
    John

Posting Permissions

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