D
dircur
Hi all this is my first time post.
I dabble in some relativly big VBA subs but I am not a programmer. This
has me stumped.
Normally I avoid buttons on spreadsheets I run my macros from toolbar
buttons not sheet buttons. I dont know if it is relevent but it always
seems the small details matter. For this macro I am initiating it from
a sheet button.
In the button code I select a different sheet then select B3, xlright,
xldown I then move into a for each cell in selection. I am getting the
error after the sheet selection, on the line:
Range("B3").Select
Full code:
___________________________________
Private Sub SelectAreas_Click()
ScreenUpdating = False
If Sheets("Benchmarks").Visible = False Then
Sheets("Benchmarks").Visible = True
End If
Sheets("Benchmarks").Select
*_Range(\"B3\").Select_*
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).SelectRange("B3").Select
For Each Cell In Selection
If Cell.Offset(0, 11).Value = "None" Then
Cell.Offset(0, 10).Value = "No"
End If
Next
Range("B2:M245").Select
Selection.autofilter
Selection.autofilter Field:=11, Criteria1:="Yes"
ScreenUpdating = True
End Sub
I dabble in some relativly big VBA subs but I am not a programmer. This
has me stumped.
Normally I avoid buttons on spreadsheets I run my macros from toolbar
buttons not sheet buttons. I dont know if it is relevent but it always
seems the small details matter. For this macro I am initiating it from
a sheet button.
In the button code I select a different sheet then select B3, xlright,
xldown I then move into a for each cell in selection. I am getting the
error after the sheet selection, on the line:
Range("B3").Select
Full code:
___________________________________
Private Sub SelectAreas_Click()
ScreenUpdating = False
If Sheets("Benchmarks").Visible = False Then
Sheets("Benchmarks").Visible = True
End If
Sheets("Benchmarks").Select
*_Range(\"B3\").Select_*
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).SelectRange("B3").Select
For Each Cell In Selection
If Cell.Offset(0, 11).Value = "None" Then
Cell.Offset(0, 10).Value = "No"
End If
Next
Range("B2:M245").Select
Selection.autofilter
Selection.autofilter Field:=11, Criteria1:="Yes"
ScreenUpdating = True
End Sub