Forum Discussion

CptWilson11's avatar
CptWilson11
Copper Contributor
May 09, 2024
Solved

VBA Code - Open Workbook Button Hidden

Hello, 

 

TIA! I'm stumped, I'm trying to revive a macro book after the creator left the company. The workbook has an expiration code attached to it and when I extend the dates, the macro doesn't update with the new dates so I'm missing something. 

 

With the extended date, upon opening the workbook, a menu button should appear is (3,15), but does not.. 

 

I'm attaching the Workbook Open code intially.

 

 

  • CptWilson11 

    Insert the following line below   Private Sub Workbook_Open():

     

        Sheets("Instructions").Shapes("menuButton").Visible = True

4 Replies

    • CptWilson11's avatar
      CptWilson11
      Copper Contributor

      HansVogelaar yes, I have. Which then doesn’t bring up the prompt, so I believe that works.

       

      But the code should make a button visible if it’s not “expired” but it is not. This is my hang up I believe. 

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        CptWilson11 

        Insert the following line below   Private Sub Workbook_Open():

         

            Sheets("Instructions").Shapes("menuButton").Visible = True

Resources