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 |
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 |
All times are GMT +1. The time now is 01:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com