![]() |
Can't test Range for Nothing
Public Sub testNullRange
Dim rRange As Range Set rRange = Nothing ' yes, in debugger If IsNull( rRange ) Then _ MsgBox "DOESN'T COME HERE" End Sub |
Can't test Range for Nothing
Don't use IsNull. Instead, use Is Nothing.
Dim rRange As Range Set rRange = Nothing ' yes, in debugger If rRange Is Nothing Then MsgBox "rRange is Nothing" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Peter Chatterton" wrote in message ... Public Sub testNullRange Dim rRange As Range Set rRange = Nothing ' yes, in debugger If IsNull( rRange ) Then _ MsgBox "DOESN'T COME HERE" End Sub |
Can't test Range for Nothing
Try: If rRange Is Nothing Then
Ebbe "Peter Chatterton" skrev i en meddelelse ... Public Sub testNullRange Dim rRange As Range Set rRange = Nothing ' yes, in debugger If IsNull( rRange ) Then _ MsgBox "DOESN'T COME HERE" End Sub |
Can't test Range for Nothing
Thanks guys.
Peter "Ebbe" k wrote in message ... Try: If rRange Is Nothing Then Ebbe "Peter Chatterton" skrev i en meddelelse ... Public Sub testNullRange Dim rRange As Range Set rRange = Nothing ' yes, in debugger If IsNull( rRange ) Then _ MsgBox "DOESN'T COME HERE" End Sub |
All times are GMT +1. The time now is 11:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com