View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Phillips[_2_] Gary Phillips[_2_] is offline
external usenet poster
 
Posts: 6
Default Hiding the sheets my macro works with...

I've got code that opens up sheet2 and searches for specific cells. When that happens you can briefly see it open up sheet2... Granted it's very fast, I'd rather have it stay on Sheet1 and just do the work in the background. Here's my code, how can I do this?

Pick = ComboBox1.Value

Sheet2.Select
Sheet2.Range("B1").Select
Sheet1.Select

While ActiveCell.Value < Pick
Sheet2.Select
Sheet2.Cells(ActiveCell.Row + 1, 2).Select
' TODO: Move the cursor over to the LEFT once
Wend

Sheet2.Cells(ActiveCell.Row, 1).Select
Pick2 = ActiveCell.Value

Sheet1.Select
Sheet1.Range("G5").Select
ActiveCell.Value = Pick2