Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default Re-execute all UDF programmatically

Hi,

I'd like to know how I can loop through all Formula / UDF in all worksheets
in a workbook programmatically? Do SpecialCells be useful here? Do the
returned Ranged (by SpecialCells) contains multiple range?

TIA.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default Re-execute all UDF programmatically

Thanks Gary, is there a way to loop and touch every formula throughout the
workbook? I want to make sure all formulae are touched, under my certain
criteria .

Thanks,

"Gary''s Student" wrote:

Try:

Sub macx()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
w.Activate
ActiveSheet.Calculate
Next w
End Sub

--
Gary''s Student


"Peter" wrote:

Hi,

I'd like to know how I can loop through all Formula / UDF in all worksheets
in a workbook programmatically? Do SpecialCells be useful here? Do the
returned Ranged (by SpecialCells) contains multiple range?

TIA.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Re-execute all UDF programmatically

You need to use Application.Calculatefull not sheet.calculate.

see http://www.decisionmodels.com/calcsecretsh.htm for more details on using
the various calculate methods from VBA.

see also http://www.decisionmodels.com/calcsecretsj.htm for advice on
writing UDFs.

Charles
______________________
Decision Models
FastExcel 2.2 Beta now available
www.DecisionModels.com

"Peter" wrote in message
...
Thanks Gary, is there a way to loop and touch every formula throughout
the
workbook? I want to make sure all formulae are touched, under my certain
criteria .

Thanks,

"Gary''s Student" wrote:

Try:

Sub macx()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
w.Activate
ActiveSheet.Calculate
Next w
End Sub

--
Gary''s Student


"Peter" wrote:

Hi,

I'd like to know how I can loop through all Formula / UDF in all
worksheets
in a workbook programmatically? Do SpecialCells be useful here? Do the
returned Ranged (by SpecialCells) contains multiple range?

TIA.



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
Execute a sub in a different project Antonio Excel Discussion (Misc queries) 8 June 10th 06 12:48 AM
Re-execute all UDF programmatically Gary''s Student Excel Programming 0 March 26th 06 11:44 PM
concatenate and then execute? miwarren Excel Worksheet Functions 6 October 17th 05 09:26 PM
Execute a program from within VBA [email protected] Excel Programming 1 January 29th 05 10:15 AM
Could not execute Gary Excel Worksheet Functions 1 December 20th 04 06:20 PM


All times are GMT +1. The time now is 10:05 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"