Rabu, 20 Januari 2016

[MS_AccessPros] Re: Short Cut Menu


When code is not working as expected the first thing you do is comment out the "On Error" line so the code will break on all errors. Do that and run it again to see if any errors come up.

Bill Mosca, Founder - MS_Access_Professionals
Microsoft Office Access MVP
My nothing-to-do-with-Access blog

---In MS_Access_Professionals@yahoogroups.com, <a1_beshari@yahoo.com> wrote :

Dear Friends
I am trying to create Short Cut Menu to my form ,I succeeded when the form Popup property is No but if the form popup property is Yes it is not working i am using Office 2010.
The Function i am using

Public Function CreateCMenu2()
On Error Resume Next


    Dim cmb As CommandBar
    Dim cmbBtn1 As CommandBarButton
    Dim cmbBtn2 As CommandBarButton

    Set cmb = CommandBars.Add("PrintingOptions", _
               msoBarPopup, False, False)
        With cmb
           Set cmbBtn2 = .Controls.Add(msoControlButton, , , , True)
            With cmbBtn2
                .Caption = "Reset"
                .OnAction = "=Openit()"
            End With
        End With

End Function

I appreciate any friend can help me




Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)



Tidak ada komentar:

Posting Komentar