View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default Maintain view of a sheet while macro runs

<sigh
tom - every time you come along behind me, i know i've either not
answered the question properly OR completely. or in this case, i
answered the question but didn't address the problem.
but it helps me learn, too.
susan

On Feb 28, 10:00 am, Tom Ogilvy
wrote:
Sure, don't write code that goes to the other sheet

Private Sub CommandButton1_Click()
'Find Record via PO# - enter # and
'choose from Current or Deleted sheet.

'Unhides columns for Search
Application.Range("_2nd_PO_PL") _
.Columns("A:N").EntireColumn.Hidden = False

UserForm12.Show

End Sub



"excelnut1954" wrote:
I have a sheet named Menu that contains command buttons the user will
choose from. I would like for the view to stay on Menu as the macro
executes. Is there a way to keep the focus on this sheet? Here's an
example of one of the button commands.


Private Sub CommandButton1_Click()
'Find Record via PO# - enter # and choose from Current or Deleted
sheet.


'Unhides columns for Search
Application.Goto Reference:="_2nd_PO_PL"
ActiveCell.Columns("A:N").EntireColumn.Select
Selection.EntireColumn.Hidden = False


' user will enter PO# to search for
UserForm12.Show


End Sub


Thanks,
J.O.- Hide quoted text -


- Show quoted text -