Thread: error in input
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Pierre via OfficeKB.com[_2_] Pierre via OfficeKB.com[_2_] is offline
external usenet poster
 
Posts: 122
Default error in input

Hi Norman,

I found out what the problem was....my sheet was protected and then your code
does not work.

Question:
- Is there a way to have your code work with a protected sheet (other then
unprotect it and protect it again after the code) ?
- is there a way to just give the rownumber back to the user?

Thanks,
Pierre


Norman Jones wrote:
Hi Pierre,

Try:

'==============
Public Sub aTester()
Dim rng1 As Range
Dim rng2

Set rng1 = Range("A3:X1000")

On Error Resume Next
Set rng2 = rng1.SpecialCells(xlCellTypeFormulas, xlErrors)
On Error GoTo 0

If Not rng2 Is Nothing Then
'Errors found
MsgBox "Errors in " & rng2.Address(0, 0)
End If

End Sub
'<<==============

Hi experts,

[quoted text clipped - 22 lines]
Thanks,
Pierre


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200511/1