Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Using Find on nonactive sheet

I have two sheets, Roster and Skills. Both sheets have a name column that is
identical. I want to pull data from the Skills sheet and put on Roster sheet.

The following code works:

Sheets("Skills").Activate
Columns(1).Find(Name).Activate
iName = ActiveCell.Row

But the following doesn't:

Sheets("Roster").Activate
With Sheets("Skills")
.Columns(1).Find(Name).Activate
iName = .ActiveCell.Row
End With

I get an "Activate method of range class failed" error. How can I use FInd
on a non active sheet?

Thanks for any help on this!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Using Find on nonactive sheet

Thanks Don. That works great! This one goes into my collection of tips.

I have other things to do on the nonactive sheet that work fine using the
With.

"Don Guillett" wrote:

try

IName=Sheets("Skills").Columns(1).Find(Name).row



--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Bonsai Bill" wrote in message
...
I have two sheets, Roster and Skills. Both sheets have a name column that
is
identical. I want to pull data from the Skills sheet and put on Roster
sheet.

The following code works:

Sheets("Skills").Activate
Columns(1).Find(Name).Activate
iName = ActiveCell.Row

But the following doesn't:

Sheets("Roster").Activate
With Sheets("Skills")
.Columns(1).Find(Name).Activate
iName = .ActiveCell.Row
End With

I get an "Activate method of range class failed" error. How can I use FInd
on a non active sheet?

Thanks for any help on this!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
save nonactive worksheet as a seperate workbook? Dwayne[_2_] Excel Programming 3 November 10th 06 03:13 PM
How do you "Find" on NonActive Page & Return Values? addiction[_2_] Excel Programming 4 November 9th 05 04:43 AM
macro in nonactive workbook Paul Excel Programming 1 January 1st 05 03:55 PM
Deleting nonactive Sheets in Excell Tom Ogilvy Excel Programming 0 August 31st 04 02:37 PM
Deleting nonactive Sheets in Excell Bernie Deitrick Excel Programming 0 August 31st 04 02:31 PM


All times are GMT +1. The time now is 08:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"