Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If ActiveSheet.UsedRange.SpecialCells(-4144) Then
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You need to cater for none being found, and test for Nothing not True. And
best to use the builtin constant, not its value Dim rng As Range On Error Resume Next Set rng = ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts) On Error GoTo 0 If Not rng Is Nothing Then MsgBox "comments" End If -- __________________________________ HTH Bob "JMay" wrote in message ... If ActiveSheet.UsedRange.SpecialCells(-4144) Then |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
appreciate the 3 (important) pointers!!
"Bob Phillips" wrote: You need to cater for none being found, and test for Nothing not True. And best to use the builtin constant, not its value Dim rng As Range On Error Resume Next Set rng = ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts) On Error GoTo 0 If Not rng Is Nothing Then MsgBox "comments" End If -- __________________________________ HTH Bob "JMay" wrote in message ... If ActiveSheet.UsedRange.SpecialCells(-4144) Then |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
type mismatch | Excel Programming | |||
Type Mismatch: array or user defined type expected | Excel Programming | |||
Type mismatch using rnge as Range with Type 8 Input Box | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming |