Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I can't get my head around why this simple piece of code won't work in release, but does in step-by-step debugging. This code is part of a userform with two calendars on it. Ideas anyone? p.s. I'm guessing the Analysis Toolpack function "networkdays" is the cause, but why? Private Sub CalendarEnd_Click() Dim sDay As Date Dim eDay As Date Dim nwDays As Integer On Error GoTo Skip sDay = CalendarStart.Value eDay = CalendarEnd.Value nwDays = networkdays(sDay, eDay) If nwDays < 1 Then GoTo Skip UserForm2.TextBox2.Value = nwDays Exit Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA errors in 2007 (works fine in 2003) | Excel Discussion (Misc queries) | |||
Macro hangs up often but sometimes works fine | Excel Worksheet Functions | |||
VLOOKUP on separate file: Works fine for a while.... | Excel Worksheet Functions | |||
VBA problem, works fine as formula but not in VBA | Excel Programming | |||
Macro works fine in xl2002 but does not in xl 2000 | Excel Programming |