Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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: Function NEXTSATURDAY(d As Date) As Date Dim TestDay As Date TestDay = d + 1 Do Until Weekday(TestDay) = 7 TestDay = TestDay + 1 Loop NEXTSATURDAY = TestDay 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use a single quote in front of a line to disable it.
Sadly, I can not get your code to fail. -- Gary''s Student - gsnu2007k "Steve" wrote: 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: Function NEXTSATURDAY(d As Date) As Date Dim TestDay As Date TestDay = d + 1 Do Until Weekday(TestDay) = 7 TestDay = TestDay + 1 Loop NEXTSATURDAY = TestDay 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The apostrophe ( ' ) makes the code into a comment.
"Steve" wrote: 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: Function NEXTSATURDAY(d As Date) As Date Dim TestDay As Date TestDay = d + 1 Do Until Weekday(TestDay) = 7 TestDay = TestDay + 1 Loop NEXTSATURDAY = TestDay 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Security Update for Excel 2003 (KB955466) Conflict with Excel 2000 | Excel Discussion (Misc queries) | |||
Update KB955466 | Excel Discussion (Misc queries) | |||
Can't install Security Update for Excel 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 security update, please help me! | Setting up and Configuration of Excel | |||
Security update KB905756 problem with Excel 2003 | Excel Discussion (Misc queries) |