View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Newbie, I dont want macro to reference worksheet name

Better:

Dim Wk As Worksheet
Set Wk = ActiveSheet
Wk.Sort.SortFields.Add _
Key:=Wk.Range("B1"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal


In article ,
JE McGimpsey wrote:

In this case,

Dim Wk As Worksheet
Set Wk = ActiveSheet
Wk.Sort.SortFields.Add _
Key:=Range("B1"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal