Select sheet, Pause till Enter pressed, return to previous sheet

  • Thread starter Thread starter Russ3Z
  • Start date Start date
R

Russ3Z

As the title says, I have a macro which, when run, is designed simply
to switch to a sheet of reference materials, pause till the user hits
enter or some other input, then returns to the previous sheet.

I originally tried using a MsgBox, but it blocks the information on
the screen, so I am hoping there is some Other way to do this.

Thanks,
Russ
 
Hi Russ

You could try using application.sendkeys,

add this code to a new module

Sub ShowSheet()
Sheets("sheet3").Activate 'Change to the name of the sheet you want to
show
End Sub

Then in the sheet you want to show until the user presses enter (for
this code it's sheet3) add the following code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.SendKeys (ENTER)
Sheets("sheet2").Activate
End Sub

this will change back to sheet2 when the user presses enter

hope this helps you out

S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top