Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

349
Views
Cannot get worksheet to stay on screen(to work on it) once closing the form(Menu to select a sheet)

I am running VBA script to display a menu. There are a few command buttons, each selecting a different worksheet (I do locks/unlocks of select sheet) for user to work on. Once completed on the worksheet, I have a macro button on the worksheet that re-displays the menu: THIS WORKS I cannot get the worksheet to remain open on the screen: the whole program seems to STOP Code thus far: (I show what I've tried) This is 1-Commandbutton that should open a worksheet to work on the history data

Private Sub cmdRPTSRVHIST_Click()
  
  Unload MAINMENU

 `Deactivate MAINMENU`   
  `Close MAINMENU`  
  `Worksheets("QRYsrvHst").Select`  
  `ActiveSheet.Name = "QrysrvHST"`  

      Sheets("Qrysrvhst").Visible = True
      Sheets("Qrysrvhst").Activate

       MsgBox ("**   what now????"), vbYesNo
    
  `'** once I click OK on MSGBOX, the pgm stops (cannot see worksheet)`
  `** seems to go back to programmer edit mode (ALT-F11)`
  `NOTE: Calling/running pgm out of ALT-F11/F5-run - might this be an issue??`

End Sub
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you run a script from the VB Project editor, then the application returns to the editor after execution has ended. It won't happen when the user runs the script outside of the editor.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!