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: 3
Default Programming Macro - Sheet Specific

Can to make a macro specific to one sheet in a workbook? I am using Office
2003 and the simple macro is shown below. There are multiple sheets in the
workbook and if you accidently run this marco when you have one of the other
sheets in the active window it really messes things up. I want the macro to
be able to effect only one sheet. In the script is selects a range
Range("A2:P32").Select Can you add something like Range
("sheetname!a2:P32").Select so it will only go to the named sheet? If this
is possible I need the syntax for the command.

Sub Wins()
'
' Wins Macro
' Macro recorded 12/6/2007 by jh
'
' Keyboard Shortcut: Ctrl+w
'
Range("A2:P32").Select
ActiveWindow.SmallScroll Down:=-9
Selection.Sort Key1:=Range("N3"), Order1:=xlDescending,
Key2:=Range("A3") _
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom
Range("A2").Select
End Sub


TIA

Mark
 
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
Run Macro When Specific Sheet Selected Carl Excel Programming 3 November 13th 07 06:03 PM
macro to send excel sheet to specific email address JonnieP Excel Programming 2 November 27th 05 09:35 PM
make a macro to move specific rows to another sheet braxton Excel Worksheet Functions 1 February 21st 05 09:01 PM
Need Macro to copy specific sheet mac Excel Worksheet Functions 1 January 17th 05 08:46 PM
How copy specific range from one sheet to another using a Macro (V Iván Excel Programming 1 November 12th 04 09:13 PM


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