ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run time error 91...pointing to where...? (https://www.excelbanter.com/excel-programming/382303-run-time-error-91-pointing-where.html)

Darin Kramer

Run time error 91...pointing to where...?
 

Howdie!!

I have a rather large complex spreadsheet with many sheets, macros and
named ranges within.
FOr some unknown reason I am able to edit ANY cell in a sheet, but when
press enter I get the above error, and also a statement that says
"Object Variable or with Block Variable not set". I then dont get the
option to debug, only the option to end. How can I find out where the
error is with the VB? (There are to many Macros to step through each one
individually)

Also strange is that it doesnt happen on 3 of the sheets, but does
happen on the remaining ones.

Any ideas are very very welcomed - because currently all this work is
unusable!!!

Thanks!

D



*** Sent via Developersdex http://www.developersdex.com ***

merjet

Run time error 91...pointing to where...?
 
You could at least narrow it to a particular macro by putting error
traps in each one, for example:

Sub macro1()
' Dim stmts
On Error GoTo ErrorTrap
'other VBA code
Exit Sub
ErrorTrap:
MsgBox ("Error in Macro1")
End Sub

Hth,
Merjet



RichardSchollar

Run time error 91...pointing to where...?
 
Hi

I would start by checking the worksheet modules (and possibly the
ThisWorkbook module) for event code that is being activated on cell
changes (possibly calculation). If they reference other macros, then
you'll still have to step thru the macros, but it should cut down the
total to run through.

Hope this helps!

Richard


On 31 Jan, 14:21, Darin Kramer wrote:
Howdie!!

I have a rather large complex spreadsheet with many sheets, macros and
named ranges within.
FOr some unknown reason I am able to edit ANY cell in a sheet, but when
press enter I get the above error, and also a statement that says
"Object Variable or with Block Variable not set". I then dont get the
option to debug, only the option to end. How can I find out where the
error is with the VB? (There are to many Macros to step through each one
individually)

Also strange is that it doesnt happen on 3 of the sheets, but does
happen on the remaining ones.

Any ideas are very very welcomed - because currently all this work is
unusable!!!

Thanks!

D

*** Sent via Developersdexhttp://www.developersdex.com***




Darin Kramer

Run time error 91...pointing to where...?
 


Thanks_all!

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com