![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello people
I am trying to get the row number of a cell which is found by Set f = Columns(3).Find(What:=ColrToFind, LookAt:=xlWhole) and inside the if...else condition I put Dim fRow As Double Set fRow = f.Row But I got a message --> Object required Why?? Please Help |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Since fRow is declared as double precision and is therefore not an object, the Set keyword is not appropriate. I suggest you change it to:
Dim fRow As Long fRow = f.Row Since a row number is a long integer, and there is no need to make it double precision.
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|