View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Neil Eves[_3_] Neil Eves[_3_] is offline
external usenet poster
 
Posts: 2
Default Excel Macro: Selecting items from another worksheet without activating it

try
Application.screenupdating=false
your code
Application.screenupdating=true

Regards
Neil

wrote in message
...
I have a question. I have several macros that I have written that
requires them to look through (copy, select, validate, etc) other
worksheets for data.

Is there away to go through these worksheets without the end-user
actually seeing the macro run through them

For Example: Lets say we have something like this

Dim cname as string
Dim searchName as string

cname = Range("A1").Value
Sheets("Sheet2").Select
Range("A1").Select
searchName = Activecell.value
Do While Activecell.value < ""
If searchName = cname then
msgbox "Sheet2 has this name" & searchName
End If
Loop

Granted this is a simple example, but it does demostrated that a user
will see Excel switch between sheets

Is there away around this??