Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default How to declare the active worksheet?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How to declare the active worksheet?

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
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
Copying the active worksheet to another worksheet in the same work queenmaam Excel Worksheet Functions 5 March 25th 08 06:56 PM
Declare Worksheet name over multiple modules Noemi Excel Programming 3 August 11th 06 06:47 AM
Basic Question - How do I return the worksheet number of the active worksheet? Regnab Excel Programming 2 May 17th 06 03:02 AM
Altering code to reference the worksheet before the active worksheet KimberlyC Excel Programming 8 March 15th 05 10:26 PM
macro to apply worksheet event to active worksheet Paul Simon[_2_] Excel Programming 3 August 7th 03 02:50 AM


All times are GMT +1. The time now is 12:00 AM.

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"