Set AutoFilter in Excel with VBA -


Can anyone explain that the first "Autofilter" statement in the code below is "Autofilter Mad of Range Class" Fail "Why Does 2010?

  ActiveSheet.AutoFilterMode = False shtUSR.Range ("A1"). Choose ActiveSheet.Range ("A1"). AutoFilter field: = 1, Sceneable dropdown: = True ActiveSheet.Range ("B1"). Autofilter field: = 2, widgetDowndown: = TruCThese.OutofilterMode = true  

I think That I got it!

Obviously, the auto filter fails if it can not get any data in the range. Try adding value to A1 and B1 cells (and also remove the ActiveSheet.AutoFilterMode = True line) For 'normal usage', to be safe, you need to have data within range You will need to do a search or test.

1 for good Q though.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -