excel vba find run time error 91 Delphi Indiana

Address 124 Westwood Dr, West Lafayette, IN 47906
Phone (765) 807-2911
Website Link
Hours

excel vba find run time error 91 Delphi, Indiana

I will mark this thread as solved. How to add an sObject to a sublislist? Register To Reply 11-25-2012,01:29 PM #9 AlphaFrog View Profile View Forum Posts Forum Guru Join Date 07-25-2011 Location Florida MS-Off Ver Excel 2003 Posts 5,340 Re: FIND function returns Runtime Error Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote « Previous Thread | Next Thread » Like this thread?

If it returns FALSE then do not match. =DataSet2!AR? = DataSet1!A2 Change the ? Hello and welcome to PC Review. Register To Reply 11-25-2012,01:12 PM #6 AlphaFrog View Profile View Forum Posts Forum Guru Join Date 07-25-2011 Location Florida MS-Off Ver Excel 2003 Posts 5,340 Re: FIND function returns Runtime Error How would I make this code ignore that whole section if it can't find a specific value (in this case "blah")?

Counter = "1" Do Until Counter = MaxCounter + 1 ' Inner loop. 'Set the find value Find = Workbooks("Format BDRweekly.xls").Sheets("Secs").Range("A" & Counter).Value 'Find them Workbooks("BDRweekly.xls").Activate Sheets("Sheet2").Select ActiveSheet.Cells(1, 2).Select deleteRow = Datasheet1 has data to process Datasheet2 has a list of unwanted text strings that, if found in column J of Datasheet1 during processing, need to be replaced. ----this is no problem, Also not sure what you want " =isItRow =" to do but you should do it in two statements instead of trying to stack them like that. Browse other questions tagged excel-vba excel-2007 runtime-error or ask your own question.

asked 4 years ago viewed 15004 times active 4 years ago Visit Chat Linked 1 Excel VBA :: Find function in loop 0 find dynamic variable code giving runtime error 91 Advertisements Latest Threads Happy Birthday Captain Zed! Register Help Remember Me? Could you please advise how to code it?

I am trying to avoid If clauses and loops because I would wait forever till the computation is done. Members List Calendar Forum Rules Dashboard Commercial Services Advanced Search Forum Microsoft Office Application Help - Excel Help forum Excel Programming / VBA / Macros [SOLVED] FIND function returns Runtime Error Set MyObject = Nothing ' Release the object. Because it's different type of value.

Forum Today's Posts FAQ Calendar Community Groups Forum Actions Mark Forums Read Quick Links What's New? the problem is : for the 1st error( required value not found), it skips properly to next for count; but the second time it finds the exact error, it shows runtime Determine if a coin system is Canonical Exploded Suffixes Why is absolute zero unattainable? How to handle a senior developer diva who seems unaware that his skills are obsolete?

AutoFilter method of Range class failed5Excel Vba Abnormal Behavior of Cells.Find on Merged Cells1VBA Is searching through cells faster with Find method or going through every cell? Results 1 to 5 of 5 Thread: Runtime Error 91 when using Find Thread Tools Show Printable Version Search Thread Advanced Search July 28th, 2005 #1 Alc View Profile View For context, I'm trying to obtain the column number for a preset date (using ActiveCell.Column). Please Login or Register to view this content.

Changing text to value did it. Before posting your question, did you look here? Remember Me? The object is a valid object, but it wasn't set because the object library in which it is described hasn't been selected in the References dialog box.

Sorry for this, but I don't want to play around with your code anymore, since it is working now... Don't jump into a With block. Could it be the case that the FIND function stops when it runs to an empty cell? You may have to register before you can post: click the register link above to proceed.

Thanks! Newer Than: Search this thread only Search this forum only Display results as threads Useful Searches Recent Posts More... Yes No Sorry, something has gone wrong. Any better way to determine source of light by analyzing the electromagnectic spectrum of the light Does chilli get milder with cooking?

I get the error 91 (meaning I can't find "blah" in this case). I know that if there is an = sign in column J then part of the string is unwanted and can be added to Datasheet2 so the next time it comes The With block must be initialized by executing the With statement. For additional information, select the item in question and press F1. Plus Find can error out for other reasons that an unfound match, ie starting the seach in an invalid location, looking in an invalid range etc.

Hot Network Questions Good Term For "Mild" Error (Software) What's the most recent specific historical element that is common between Star Trek and the real world? Also it is better to check if anything is found using If Not aCell Is Nothing Then to avoid any errors. and it is for free? 11 answers Need help creating good password? 32 answers Programming Game in C.? 6 answers More questions Rewrite the code using single cout, without altering the Set a range (aCell) to whatever returns form .Find() if that Is Nothing then not found.

Yes No Additional feedback? 1500 characters remaining Submit Skip this Thank you! I would very much appreciate any help here. Forum Board FAQ Forum Rules Guidelines for Forum Use FAQ Forum Actions Mark Forums Read Quick Links Today's Posts Search New Posts Zero Reply Posts Subscribed Threads MrExcel Consulting Advanced Search Member Login Remember Me Forgot your password?

Can anyone help? Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders What's New? MyCount = MyObject.Count ' Make a reference to a released object. All times are GMT -5.

VB: deleteRow = ActiveSheet.Cells.Find(What:=Find, After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Row FYI, the whole sub looks like this: VB: Sub DeleteSecretaries() MaxCounter = SecretariesLastRow ' Initialize variables. What should be my next steps then? And what about "double-click"? Learning resources Microsoft Virtual Academy Channel 9 MSDN Magazine Community Forums Blogs Codeplex Support Self support Programs BizSpark (for startups) Microsoft Imagine (for students) United States (English) Newsletter Privacy & cookies

When you have received an answer to your question, please mark it as resolved using the Thread Tools menu. Like this: VB: Sub Test() Dim rngFind As Range, deleterow As Long Set rngFind = ActiveSheet.Cells.Find(What:=Find, After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not rngFind Is Nothing Then Long Answer: = Give some detail about what you want the macro to do... Taffycat posted Oct 15, 2016 at 9:19 AM WCG Stats Saturday 15 October 2016 WCG Stats posted Oct 15, 2016 at 8:00 AM Review round up - 14 October 2016 Becky

However, I don't know where it refers to, because the only object in the FIND function is the Cell., which I don't have to define. You attempted to use an object variable that has been set to Nothing. Read this: Cross-posters Struggling to use tags (including Code tags)? : Forum tags July 28th, 2005 #3 Alc View Profile View Forum Posts I agreed to these rules Join Date 7th