LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Recalculation problem

The macro will always give the number of visible rows (well visible rows -1)
but it sounds like when you manually change the number of visible rows by
adding data you aren't running the macro again to recalculate until you
double click the sheet.

Maybe you need to consider running the macro dependant on another event.

Mike

"אלי" wrote:

Hi!

I am trying to calculate the number of visible rows in a filtered sheet.
this sheet is all the time accumulate more and more rows, and the code that
i use can not recalculate the number of visible rows unless i am selecting
the relevant cells and double click them. (first calculation is working)

The code is base on Tom Ogilvy's code found somewhere.

Dim tdy As Date
Dim Sum1 As Integer
Dim wss As Worksheet
Dim rng As Range
Set rng = ActiveSheet.AutoFilter.Range
Set wss = Worksheets("Sheet1")
wss.Select
tdy = Format(Date, "Short Date")
Selection.AutoFilter Field:=6, Criteria1:=tdy
Selection.AutoFilter Field:=7, Criteria1:="Day"
num1 = rng.Columns(2).SpecialCells(xlCellTypeVisible).Cou nt - 1

Thanks for your suggestion

Eli

 
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
Recalculation Problem After Save As. Stuart Hagon Excel Discussion (Misc queries) 4 September 29th 08 11:48 AM
Excel Recalculation problem with VBA function [email protected] Excel Programming 4 January 4th 07 07:24 PM
Problem with Slow ReCalculation of Dynamic Range Using OFFSET Kris_Wright_77 Excel Worksheet Functions 2 November 18th 05 10:18 AM
Controling recalculation - or how to solve my speed problem? Peter Lipp Excel Programming 4 September 13th 05 03:04 PM
Problem in Excel RTD and Manual Recalculation [email protected] Excel Programming 5 August 31st 05 11:33 AM


All times are GMT +1. The time now is 10:36 AM.

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

About Us

"It's about Microsoft Excel"