LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Find a variable

I am simply trying to find a user-input variable on the worksheet.

Dim itemn As String
itemn = "&5050"
Columns("a:a").Select
Find(What:=itemn, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False).Activate

this code always returns the compiler error 'Object variable or With block
not set.'
This is the entire code. I do not recieve the error if use a set value in
place of 'itemn'. I also do not recieve the error if I do not set 'itemn' to
a value
anyone able to tell me why this happens???
thanks
 
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
Variable Find Joe Murphy[_2_] Excel Discussion (Misc queries) 1 January 7th 09 02:21 PM
Find Max from Variable Range Dan Excel Worksheet Functions 6 February 22nd 08 11:35 PM
Cells.Find with a variable El Bee Excel Discussion (Misc queries) 4 January 28th 08 09:30 PM
Right Text - Variable Find Karin Excel Discussion (Misc queries) 2 June 7th 07 03:24 PM
Cells.Find error Object variable or With block variable not set Peter[_21_] Excel Programming 2 May 8th 04 02:15 PM


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