vba - Dynamically Sorting Lists Alphabetically in Excel -


i having difficulties macros in excel. have built call logger in workbook containing 2 macros:

  • macro moves data worksheet worksheet b;
  • macro b automatically sorts data 1 column in descending alphabetical order.

however, can't both macros work @ same time. both work individually when try implement 1 macro workbook containing other seem cancel each other out. going wrong? there way of possibly combining 2 macros, example? macros below.

macro a:

 sub macro6()     ' macro6 macro     application.screenupdating = false      sheets("logger").select     range("b4:i4").select     selection.copy     sheets("data").select     range("b4").select     lmaxrows = cells(rows.count, "b").end(xlup).row     range("b" & lmaxrows + 1).select     activesheet.paste     application.cutcopymode = false     sheets("logger").select     range("b4:i4").select     selection.clearcontents end sub 

macro b:

private sub worksheet_selectionchange(byval target range)     on error resume next     if not intersect(target, range("h:h")) nothing         range("h3").sort key1:=range("h4"), _           order1:=xldescending, header:=xlyes, _           ordercustom:=1, matchcase:=false, _           orientation:=xltoptobottom     end if end sub 

thank in advance assistance this.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -