Run-time error 91

Trevor Wood

New Member
Joined
May 4, 2002
Messages
25
When I am using the following line of code I sometimes get a Run-time error 91 error.

Columns("A").Findnext().Activate

It doesn't happen every time but when it does I have to re-start Excel.

It seems like something needs resetting.

I can often get it to err after running a completely seperate macro in the same worksheet.

Can anyone suggest something?
This message was edited by Trevor Wood on 2002-05-05 23:15
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
On 2002-05-05 22:44, Trevor Wood wrote:
When I am using the following line of code I sometimes get a Run-time error 91 error.

Columns("A").Findnext.Activate

It doesn't happen every time but when it does I have to re-start Excel.

It seems like something needs resetting.

I can often get it to err after running a completely seperate macro in the same worksheet.

Can anyone suggest something?

This Error used with the FindFunction is typical of Not having the Findfunction
find anything either beacuse you haven't initialised a value to find OR you there the
function has not found a value to search for.
Either way you can Trap this error with
On Error resume Next and then check for
an error and do something....eg

Without knowing your full code...

<pre/>
Sub tt()
On Error Resume Next
Columns("A").FindNext.Activate
If Err Then MsgBox "Nothing found!": On Error GoTo 0

End Sub
</pre>

This Error however should cause Excel to
to become unstable and have you shut it down ??

What other code are you using in conjuction with this ??
 
Upvote 0

Forum statistics

Threads
1,214,393
Messages
6,119,261
Members
448,880
Latest member
aveternik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top