Of course, if D is Saturday, you may wish to use
NEXTSATURDAY = d+1 + (7 - WorksheetFunction.Weekday(d+1))
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
"Bernard Liengme" wrote in message
...
This does not answer you basic question about the Security Update
But how about ?
Function NEXTSATURDAY(d As Date) As Date
NEXTSATURDAY = d + (7 - WorksheetFunction.Weekday(d))
End Function
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
"Steve" wrote in message
...
My PC installed this security update automatically this past week and
now when I open a spreadsheet that I use daily with the following code
in it, I get "Automation Error-Catastrophic failure" when I
unistalled this update, the code runs fine again.
The code is:
Any help you can give would be appreciated.
Also, I cannot remember the character to place at the front of a line
of code to disable it.
Thanks, Steve