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

Hope this takes this time.

I have on sheet 1 a button that I have attached code to that is suppose to
sort data on sheet 2, sheet 3, sheet 4, well it is not working. So I'm
asking for help in trying to figure out what I'm doing wrong.

On sheet 1 the code is:

Private Sub Main Button 1()
Sheets ("Sheet 1").Select
ActiveSheet.Range ("A1:D45").Select
Call Sort1

Sheets ("Sheet 2").Select
ActiveSheet.Range ("A1:D45").Select
Call Sort1

Sheets ("Sheet 3").Select
ActiveSheet.Range ("A1:D45").Select
Call Sort1

End Sub
=================
Private Sub Sort1()

Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlNo,
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortNormal

End Sub
=================


 
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
a command button problem NA_AB[_2_] Excel Programming 1 January 9th 09 02:28 PM
Command Button Problem albertmb Excel Discussion (Misc queries) 6 June 22nd 08 01:06 PM
Problem with command button name Jason[_9_] Excel Discussion (Misc queries) 10 October 19th 07 09:54 PM
Problem programming the Sort command marshy26 Excel Programming 5 August 29th 05 02:36 AM
Command Button Problem del Excel Programming 3 November 21st 03 05:13 PM


All times are GMT +1. The time now is 01:58 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"