Super-Easy question if you know anything about VBA

User avatar
ladybugblue
Lounger
Posts: 34
Joined: 19 Feb 2010, 22:04
Location: Appleton, WI

Super-Easy question if you know anything about VBA

Post by ladybugblue »

Which I don't!

:)

How do I change this code:
ActiveWorkbook.Worksheets("HR Assess").AutoFilter.Sort.SortFields.Clear

to refer to the active worksheet tab, rather than to the specific "HR Assess" tab.

I know I could dig for it and find it, but hoping one of you gurus can tell me quick off the top of your head.

Thanks!

User avatar
StuartR
Administrator
Posts: 12604
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Super-Easy question if you know anything about VBA

Post by StuartR »

ActiveWorkbook.ActiveSheet.AutoFilter.Sort.SortFields.Clear
StuartR


User avatar
ladybugblue
Lounger
Posts: 34
Joined: 19 Feb 2010, 22:04
Location: Appleton, WI

Re: Super-Easy question if you know anything about VBA

Post by ladybugblue »

You're a rock star - heaps o' thanks!

Angela :cheers: