J
James
Hi Guys
I know little bit of VBA & use XL2002. I am creating a
macro which works fine when called from any workbook with
the exception of a workbook which may have any Conditional
Formating.
Here is the code
On Error Resume Next
Set MyRange = Application.InputBox _
(Prompt:="Please Select a Data Range
(Block) to Search for", Title:=".", Type:=8)
If MyRange.Cells.Count = 0 Then Exit Sub
If MyRange.Columns.Count <> 1 Then
MsgBox "You Can Only Select Data in One Column" &
vbCrLf & "Please Try Agian", vbOKOnly +
vbInformation, "Boo Boo..."
Exit Sub
End If
If the worksheet has a condtional formation the following
condition becomes true regardless of the fact that a Range
of data was selected
If MyRange.Cells.Count = 0 Then Exit Sub
Why it does that, is there a way around ..a fix (i do need
to keep Conditional formating on the sheet as well)
Thanks a lot for ur help in advance
-James
I know little bit of VBA & use XL2002. I am creating a
macro which works fine when called from any workbook with
the exception of a workbook which may have any Conditional
Formating.
Here is the code
On Error Resume Next
Set MyRange = Application.InputBox _
(Prompt:="Please Select a Data Range
(Block) to Search for", Title:=".", Type:=8)
If MyRange.Cells.Count = 0 Then Exit Sub
If MyRange.Columns.Count <> 1 Then
MsgBox "You Can Only Select Data in One Column" &
vbCrLf & "Please Try Agian", vbOKOnly +
vbInformation, "Boo Boo..."
Exit Sub
End If
If the worksheet has a condtional formation the following
condition becomes true regardless of the fact that a Range
of data was selected
If MyRange.Cells.Count = 0 Then Exit Sub
Why it does that, is there a way around ..a fix (i do need
to keep Conditional formating on the sheet as well)
Thanks a lot for ur help in advance
-James