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: 132
Default find location

I'm trying to set the current selection to an address on a row that contain
dates equal to the end of each monht and matches the current date on a data
page (month ends muct match). The following code returns a type mismatch
error. Can any one help

Sub FindCurMonth()

Dim CurLocation As Range

Dim curDate As Range

Set curDate = Range("B3")


Set CurLocation = Rows(13).Find(What:=curDate.Value, _
After:=Cells(1), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)

Dim rng As Range
Set rng = Range(CurLocation.Address)
Debug.Print (rng)

If Not CurLocation Is Nothing Then
Address = CurLocation.Address
CurLocation.Select
Else
MsgBox "Not found"
End If
End Sub


--
Jim
 
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
How to find out the cell location Lamb Chop Excel Discussion (Misc queries) 3 September 7th 06 12:22 PM
Is it Possible to Find Shape at a Location (#find) for XL97? JK Excel Programming 4 March 16th 06 06:15 PM
find location max value in column rroach Excel Discussion (Misc queries) 3 July 13th 05 10:27 PM
find cell location of max value in column rroach Excel Programming 6 June 6th 05 04:59 PM
find location Ed Excel Programming 2 August 17th 04 09:20 PM


All times are GMT +1. The time now is 09:23 AM.

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"