PC Review


Reply
Thread Tools Rate Thread

How to declare the active worksheet?

 
 
=?Utf-8?B?TWVraW5uaWs=?=
Guest
Posts: n/a
 
      1st Nov 2007
In the following lines of code how co uld I declare what the activesheet is
and make the line still work?

For dX = 1 To ActiveSheet.UsedRange.Rows.Count
If IsError(Application.Match(sSelected, ActiveSheet.Columns(1), 0)) Then
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      1st Nov 2007
First activate the sheet you want:

Sheets("Sheet1").Activate
--
Gary''s Student - gsnu200753


"Mekinnik" wrote:

> In the following lines of code how co uld I declare what the activesheet is
> and make the line still work?
>
> For dX = 1 To ActiveSheet.UsedRange.Rows.Count
> If IsError(Application.Match(sSelected, ActiveSheet.Columns(1), 0)) Then

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.NET: How to declare a parameter in a worksheet-function Etienne-Louis Nicolet Microsoft Excel Programming 2 11th Mar 2009 01:09 PM
Declare Worksheet name over multiple modules =?Utf-8?B?Tm9lbWk=?= Microsoft Excel Programming 3 11th Aug 2006 06:47 AM
Basic Question - How do I return the worksheet number of the active worksheet? Regnab Microsoft Excel Programming 2 17th May 2006 03:02 AM
Altering code to reference the worksheet before the active worksheet KimberlyC Microsoft Excel Programming 8 15th Mar 2005 10:26 PM
macro to apply worksheet event to active worksheet Paul Simon Microsoft Excel Programming 3 7th Aug 2003 02:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:32 PM.