#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macro help

I have this macro as follows

Sub Copy_ESM_Prices()
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("Dump").Select
Application.Goto Reference:="R1C1"
ActiveSheet.Paste
Application.Goto Reference:="ClippedGrid"
ActiveWindow.LargeScroll Down:=0
ActiveWindow.ScrollRow = 1
Selection.Sort Key1:=Range("B3"), Order1:=xlAscending,
Key2:=Range("B3") _
, Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
ActiveWindow.SmallScroll ToRight:=1
ActiveWindow.LargeScroll ToRight:=-1

Sheets("TAB1").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("TAB2").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("TAB3").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("Dump").Select
End Sub

When I remove the section from :- sheets("tab1").select -:
down to :- sheets("dump").select (as per example)
The macro does not work.

Sub Copy_ESM_Prices()

'
' Keyboard Shortcut: Ctrl+t

'
Sheets("Dump").Select

Application.Goto Reference:="R1C1"

ActiveSheet.Paste

Application.Goto Reference:="ClippedGrid"

ActiveWindow.LargeScroll Down:=0

ActiveWindow.ScrollRow = 1

Selection.Sort Key1:=Range("B3"), Order1:=xlAscending,
Key2:=Range("B3") _

, Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase:= _

False, Orientation:=xlTopToBottom

ActiveWindow.SmallScroll ToRight:=1

ActiveWindow.LargeScroll ToRight:=-1

Sheets("Dump").Select

End Sub

Can any body help me please.

your help will be very much appreciated

Thank You

Rgs Jerie

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default macro help

What is it supposed to do and what doesn't happen?

--

HTH

RP

"Jerie" wrote in message
...
I have this macro as follows

Sub Copy_ESM_Prices()
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("Dump").Select
Application.Goto Reference:="R1C1"
ActiveSheet.Paste
Application.Goto Reference:="ClippedGrid"
ActiveWindow.LargeScroll Down:=0
ActiveWindow.ScrollRow = 1
Selection.Sort Key1:=Range("B3"), Order1:=xlAscending,
Key2:=Range("B3") _
, Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
ActiveWindow.SmallScroll ToRight:=1
ActiveWindow.LargeScroll ToRight:=-1

Sheets("TAB1").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("TAB2").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("TAB3").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("Dump").Select
End Sub

When I remove the section from :- sheets("tab1").select -:
down to :- sheets("dump").select (as per example)
The macro does not work.

Sub Copy_ESM_Prices()

'
' Keyboard Shortcut: Ctrl+t

'
Sheets("Dump").Select

Application.Goto Reference:="R1C1"

ActiveSheet.Paste

Application.Goto Reference:="ClippedGrid"

ActiveWindow.LargeScroll Down:=0

ActiveWindow.ScrollRow = 1

Selection.Sort Key1:=Range("B3"), Order1:=xlAscending,
Key2:=Range("B3") _

, Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase:= _

False, Orientation:=xlTopToBottom

ActiveWindow.SmallScroll ToRight:=1

ActiveWindow.LargeScroll ToRight:=-1

Sheets("Dump").Select

End Sub

Can any body help me please.

your help will be very much appreciated

Thank You

Rgs Jerie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default macro help

Jerie

What error are you getting, what line does it fail on?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Jerie" wrote in message
...
I have this macro as follows

Sub Copy_ESM_Prices()
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("Dump").Select
Application.Goto Reference:="R1C1"
ActiveSheet.Paste
Application.Goto Reference:="ClippedGrid"
ActiveWindow.LargeScroll Down:=0
ActiveWindow.ScrollRow = 1
Selection.Sort Key1:=Range("B3"), Order1:=xlAscending,
Key2:=Range("B3") _
, Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
ActiveWindow.SmallScroll ToRight:=1
ActiveWindow.LargeScroll ToRight:=-1

Sheets("TAB1").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("TAB2").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("TAB3").Select
Application.Goto Reference:="R1C1"
Range("Pricesv3.xls!ClippedGrid").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Range("A2:A3"), CopyToRange:=Range
("B2"), Unique:=False
Sheets("Dump").Select
End Sub

When I remove the section from :- sheets("tab1").select -:
down to :- sheets("dump").select (as per example)
The macro does not work.

Sub Copy_ESM_Prices()

'
' Keyboard Shortcut: Ctrl+t

'
Sheets("Dump").Select

Application.Goto Reference:="R1C1"

ActiveSheet.Paste

Application.Goto Reference:="ClippedGrid"

ActiveWindow.LargeScroll Down:=0

ActiveWindow.ScrollRow = 1

Selection.Sort Key1:=Range("B3"), Order1:=xlAscending,
Key2:=Range("B3") _

, Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase:= _

False, Orientation:=xlTopToBottom

ActiveWindow.SmallScroll ToRight:=1

ActiveWindow.LargeScroll ToRight:=-1

Sheets("Dump").Select

End Sub

Can any body help me please.

your help will be very much appreciated

Thank You

Rgs Jerie



Reply
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 04:27 AM.

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

About Us

"It's about Microsoft Excel"