Try...
If Sheet1.FilterMode Then Sheet1.ShowAllData
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
"WH99"
<wrote in message
I have a search facility which filters the data, That works ok, but when I
press commandbutton1 (code below) it should show all data and change to
sheet7. I get an error code 1004 and the following is highlighted
"Sheet1.ShowAllData".
Any ideas?
Option Explicit
Private Sub CommandButton1_Click()
Sheet1.Unprotect
Sheet1.ShowAllData
Cells.Range("A1").Select
Sheet1.Protect
Sheet7.Select
Worksheets("menu").CommandButton3.Visible = True
End Sub
--
WH99