Sub CheckVersion() If Val(Application.Version) < 9 Then MsgBox "This works only with Excel 2000 or later" End If End Sub