LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Run-Time Error on Cell Range Select

I get a run-time error 1004 on the .Select line. Can someone suggest a fix?

Sub FindDate()
Dim rn As Long, offset As Long
Dim stdate As Date, actdate As Date
actdate = Range("Z2").Value
rn = IsoWeekNumber(actdate)
If rn / 2 < Int(rn / 2) Then rn = rn €“ 1
stdate = Range("A" & rn + 6).Value
offset = actdate €“ stdate
Range(Cells(rn + 6, 3 + offset), Cells(rn + 7, 3 + offset)).Select
End Sub


 
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
Run-Time error '1004' : Select method of Range class failed [email protected] Excel Discussion (Misc queries) 3 March 9th 07 01:36 PM
Run-time error '1004': Select method of Range class failed pglufkin Excel Programming 3 October 26th 06 03:27 PM
Select method of range class failed, Run time error 1004 smit127 Excel Programming 1 September 1st 05 12:43 PM
Run-time 1004 error on range select Morgan[_3_] Excel Programming 3 November 11th 03 11:44 PM


All times are GMT +1. The time now is 05:22 PM.

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

About Us

"It's about Microsoft Excel"