View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Sort in hidden page crach

I suspect that the 'Sort' requires the sheet be visible and active. Not
sure about that but I've always used a temp wkb to dump data for
sorting because it's faster than any VBA sort algorithms I've seen. I
do this from addins so I don't have to set the addin 'IsAddin=False'!
IMO, it's just not good to make changes to an addin at runtime. There
are exceptions where storing settings is concerned, but these are
usually temporary and changes aren't saved (as a rule). Not sure why
you use a sheet in the addin itself...

ThisWorkbook *always* refers to the project running the code.
ActiveWorkbook *always* refers to the current visible window.
You can't use 'Select' in hidden sheets, but then it's rarely necessary
to select anything anyway.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion