Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workdays/Networkdays #Name? Error K Excel Worksheet Functions 12 July 16th 08 07:13 PM
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM
#Name? Error when using NETWORKDAYS function ...... SeanAlexander Excel Worksheet Functions 2 September 8th 05 10:47 AM
How can I still go to the error-code after a On Error Goto? Michel[_3_] Excel Programming 2 May 4th 04 04:21 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"