M
M Chahal
Hi,
I need to create variables for worksheet names and the same for filter
criteria that will be used in different subs in the module - do i need to
'declare' each time in a new sub?
ex:
Sub X1()
V1 = "GI-ACE"
Sheets(V1).Select
Call S
End Sub
Sub S()
ActiveSheet.UnProtect ("util")
Range("B43:BW200").Select
Selection.ClearContents
Sheets("Data").Select
Selection.AutoFilter Field:=1, Criteria1:=V1 '#####this is where it fails'
Range("E3:G800").Select
Selection.Copy
Sheets(V1).Select '#####this is where it fails'
Range(B42).Select
Selection.PasteSpecial Paste:=xlPasteValues
any help appreciated
I need to create variables for worksheet names and the same for filter
criteria that will be used in different subs in the module - do i need to
'declare' each time in a new sub?
ex:
Sub X1()
V1 = "GI-ACE"
Sheets(V1).Select
Call S
End Sub
Sub S()
ActiveSheet.UnProtect ("util")
Range("B43:BW200").Select
Selection.ClearContents
Sheets("Data").Select
Selection.AutoFilter Field:=1, Criteria1:=V1 '#####this is where it fails'
Range("E3:G800").Select
Selection.Copy
Sheets(V1).Select '#####this is where it fails'
Range(B42).Select
Selection.PasteSpecial Paste:=xlPasteValues
any help appreciated