Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Networkdays code error
Code to perform networkdays function:
Set rng = Sheets("Job Details").[C3] Set hols = Range(Sheets("Hide").[E2], Sheets("Hide").[E11]) Set myrange = Union(rng, hols) If Not Intersect(myrange, target) Is Nothing Then Range("Hide!D2").GoalSeek Goal:=6, ChangingCell:=Range("Hide!C2") End If MsgBox "The date 6 working days from " & Sheets("Job Details").[A1] & " will be: " & WorksheetFunction.Text(Sheets("Hide").[C2], "mm/dd/yyyy") This line errors out: Set hols = Range(Sheets("Hide").[E2], Sheets("Hide").[E11]) Looks like it should work. What am I missing? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Networkdays code error
On Sat, 23 Feb 2008 10:51:01 -0800, dgd1212
wrote: This line errors out: Set hols = Range(Sheets("Hide").[E2], Sheets("Hide").[E11]) Looks like it should work. What am I missing? Thanks Works OK he ================== Sub foo() Dim hols As Range Set hols = Range(Sheets("Hide").[E2], Sheets("Hide").[E11]) Debug.Print hols.Address End Sub ===================== --$E$2:$E$11 ===================== What is the error message? --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workdays/Networkdays #Name? Error | Excel Worksheet Functions | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
#Name? Error when using NETWORKDAYS function ...... | Excel Worksheet Functions | |||
How can I still go to the error-code after a On Error Goto? | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming |