Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Abelerd Fischer   on Aug 22 In MS Office Category.

  
Question Answered By: Reamonn Fischer   on Aug 22

In the excel  sheet, I press  ctrl-a to start  a macro  to sort  data. I
get the following error  Run-time error '1004': Application-defined
or object-defined error. This is the following code. It errors out
on the selection sort line

Sub Sort_results()
'
' Sort_results Macro
' Macro recorded 3/28/2007 by David I. Thal
'
' Keyboard Shortcut: Ctrl+a
'
Range("B5:B11").Select
Selection.Copy
Range("E5").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Sort Key1:=Range("E5"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub

Any ideas??????? If you want the excel sheet, let me know. I will
send it to you.

Share: 

 
 
Didn't find what you were looking for? Find more on get an error when I run a macro Or get search suggestion and latest updates.


Tagged: