View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] whitethomas12@gmail.com is offline
external usenet poster
 
Posts: 33
Default Excel Macro: Selecting items from another worksheet withoutactivating it

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??