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: 1,814
Default Data Error 9 Subprocedure Out of Range

Sub Find_Todays_Date()
Dim FindString As Date
Dim Rng As Range
FindString = CLng(Date)
With Sheets("Sheet1").Range("A:A")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
Else
MsgBox "Nothing found"
End If
End With
End Sub


This is my code. It is supposed to goto the date when executed. It works
fine on my machine, but I tried putting it on someone else's and it gave me a
data error message. It said something like the subprocedure is out of range.
It was Data Error 9. I've checked the refrence style setting in the options
pannel and they are the same on both machines. We are both using MS 2003, but
come to think of it Im not sure which SP the other one is using... Any ideas?
 
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
Macro subprocedure orquidea Excel Discussion (Misc queries) 6 May 13th 08 01:10 AM
Hyperlink to a subprocedure in an other workbook LimaB Excel Worksheet Functions 0 July 20th 06 08:35 PM
VBA code: call subprocedure Terry Excel Programming 5 December 14th 05 04:49 AM
how to call subprocedure from within procedure? dreamz[_12_] Excel Programming 23 November 1st 05 06:38 PM
Passing range to subprocedure - maybe? Mike Gerbracht Excel Programming 2 July 26th 03 02:44 AM


All times are GMT +1. The time now is 12:49 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"