ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to declare the active worksheet? (https://www.excelbanter.com/excel-programming/400437-how-declare-active-worksheet.html)

Mekinnik

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

Gary''s Student

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



All times are GMT +1. The time now is 11:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com