• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

Invalidate a riboon

I have a ribbon named MyRibbon. How can I invalidate it from VBA?
  • 2
1 Solution
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
What do you mean by "invalidate"? Do you mean stop it from showing, or disable it, or what?
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Invalidate is a VBA Ribbon command. The sample dbs that was on the link here have examples. Removing the link to the most useful Ribbon site on the planet seems a bit much :-(

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
The sample db attached from Here has examples of the Validate command.

Open the VBA editor and search for 'invalidate'

For example:

Private Sub btnSet_Click()
Dim strSQL As String

    If Nz(Me!lstData, 0) <> 0 Then
        strSQL = "UPDATE tblData SET tblData.txtName = '" & Nz(Me!txtText, " ") & "', tblData.txtSubName = '" & Nz(Me!txtSubText, " ") & "', tblData.txtImageMso = '" & Me!ComboImageMso & "', tblData.bolVisible = " & Me!chkVisible & " "
        strSQL = strSQL & "WHERE (((tblData.ID)=" & Me!lstData & ")); "
        CurrentDb.Execute strSQL
        Me!txtText = ""
        Me!txtSubText = ""
        Me!chkVisible = 0
        Me!lstData = Null
        Me!ComboImageMso = ""
    End If
End Sub
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now