Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA- Counting the number of the sheets
Hi,
I’m trying to write a macro which could count the number of the sheet in the workbook. I need this for a condition in my do-loop circle. Th number of the sheets is variable. If somebody could help me and tell me a way to do this I would be ver pleased. Thanks, -Tims -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA- Counting the number of the sheets
Timse,
these two should do the job: Activeworkbook.Sheets.Count OR Workbooks("name").Sheets.Count Good luc -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA- Counting the number of the sheets
Timse,
Worksheets.Count will return the number. HTH, Nikos "Timse " wrote in message ... Hi, I’m trying to write a macro which could count the number of the sheets in the workbook. I need this for a condition in my do-loop circle. The number of the sheets is variable. If somebody could help me and tell me a way to do this I would be very pleased. Thanks, -Timse --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA- Counting the number of the sheets
Timse
ActiveWorkbook.Sheets.Count will count all the sheets (worksheets, charts, etc.) ActiveWorkbook.Worksheets.Count just the worksheets. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Timse " wrote in message ... Hi, I'm trying to write a macro which could count the number of the sheets in the workbook. I need this for a condition in my do-loop circle. The number of the sheets is variable. If somebody could help me and tell me a way to do this I would be very pleased. Thanks, -Timse --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA- Counting the number of the sheets
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting number of cells that match name AND number | Excel Worksheet Functions | |||
Counting Occurances across a range of sheets | Excel Discussion (Misc queries) | |||
counting duplicates Among Many Sheets, Possible?? | New Users to Excel | |||
Counting occurrences over range of sheets | Excel Worksheet Functions | |||
Loop across Sheets and number of sheets | Excel Programming |