LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem programming the Sort command

I was having the same problem trying to sort a data table that is stored in
an add-in. I think that William Benson is on the right track.

This worked for me...each time that you refer to the range, you need to
define the worksheet.

ExcelAppRecipe.Selection.Sort Key1:=ExcelAppRecipe.Range("B5"),
Order1:=xlAscending


"marshy26" wrote:

Thanks for the replies. I've tried both solutions that have been
suggested but I'm still having problems?
What I have noticed is, if I create a macro in excel to do the sort and
then add the following line it works.

ExcelAppRecipe.Application.Run "'Theale SH Recipe.xls'!Sort_ID"

I don't really want to do it this way and would rather go down the
route i was going if it is possible?

I've done a few searches on the net and have tried various ways of
using the sort command but I'm still getting error 1004 :o(

Thanks once again




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
programming command bars Little Elephant with Big Ears Excel Discussion (Misc queries) 3 January 15th 10 07:16 PM
Counting, command button and programming in VB ElFrodo Excel Discussion (Misc queries) 5 February 23rd 07 05:24 AM
Programming a "Save as..." command button within Excel DavidHawes Excel Discussion (Misc queries) 2 November 13th 06 02:48 PM
Sort command does not sort some columns? BillyBob New Users to Excel 4 May 11th 06 04:16 PM
Programming command button to execute on a different worksheet Ed[_21_] Excel Programming 4 July 29th 04 12:17 AM


All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"