autofilter removed by macro VBA

  • Thread starter Thread starter Potsy
  • Start date Start date
P

Potsy

anyone know what the VBA coding would be to run a macro automatically
on a workbook to remove autofilter on a sheet titled "Job Record"
ranges A1:AG1

ideally when saving it would remove so that the next time it is opened
it does not filter them.

we have problems at the moment where filters get used, left on saved
and then someone else opens and double books numbers.

can this be done outsde of VBA?

hope makes sense.
 
You could put this in your workbook_open event

Sub iffilter()
With Sheets("sheet1")
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub
 
You could put this in your workbook_open event

Sub iffilter()
With Sheets("sheet1")
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software









- Show quoted text -

thanks, just tried and substituted "sheet1" with "Job Record" name of
worksheet can't seem to get working - user error!! sorry, not great in
vba

Private Sub Workbook_Open()

End Sub
Sub iffilter()
With Sheets("Job Record")
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub
 
Private Sub Workbook_Open()
With Sheets("Job Record")
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub
 
Private Sub Workbook_Open()
With Sheets("Job Record")
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
You could put this in your workbook_open event

Sub iffilter()
With Sheets("sheet1")
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
in message









- Show quoted text -

thanks, just tried and substituted "sheet1" with "Job Record" name of
worksheet can't seem to get working - user error!! sorry, not great in
vba

Private Sub Workbook_Open()

End Sub
Sub iffilter()
With Sheets("Job Record")
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub
 
Back
Top