Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem running macro across worksheets within workbook


I have a 100 worksheet document and need to extract some of the data for
an eventual access database. I recorded the macro below to work on a
single worksheet, but how can I loop it through all the worksheets? If
I run it manually, it just pastes over previous data.

Sub SingleSheet()
'
' SingleSheet Macro
' Macro recorded 3/30/2006 by
'

'
Range("C2").Select
Selection.Copy
Columns("A:A").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight
Range("D2").Select
Selection.Copy
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("A1:A153"),
Type:=xlFillDefault
Range("A1:A153").Select
Range("J9:V153,A9:C153,I9:I153").Select
Range("I153").Activate
Selection.Copy
Windows("Orange.xls").Activate
Range("A1").Select
ActiveSheet.Paste
Windows("template.xls").Activate
End Sub


--
weene27
------------------------------------------------------------------------
weene27's Profile: http://www.excelforum.com/member.php...o&userid=32996
View this thread: http://www.excelforum.com/showthread...hreadid=528199

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
Running Same macro in 250 Worksheets in Same Workbook halem2 Excel Worksheet Functions 3 March 24th 06 08:51 AM
Problem in updating all worksheets of a workbook using a macro that calls another macro [email protected] Excel Programming 3 March 20th 06 05:21 AM
Running a macro for all visible worksheets in a workbook Craig_Richards Excel Discussion (Misc queries) 2 August 8th 05 12:24 PM
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 PM
Problem running macro from add-in (xla-file) in a shared workbook. Klaus Trampedach Excel Programming 0 September 30th 03 03:32 PM


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