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: 66
Default macro - small change

This macor works great - but I only want to copy Row 2. ****HERE****
Can someone help?
Thanks
T

Sub Master()

Dim myBook As Workbook

Dim myCalc As XlCalculation

Dim myShtName As String



With Application

.EnableEvents = False

.DisplayAlerts = False

myCalc = .Calculation

.Calculation = xlCalculationManual

End With



On Error Resume Next

With Application.FileSearch

.NewSearch

'Change this to your directory

.LookIn = "H:\WR Intake"
.SearchSubFolders = False

.FileType = msoFileTypeExcelWorkbooks

If .Execute() 0 Then

For i = 1 To .FoundFiles.Count

Set myBook = Workbooks.Open(.FoundFiles(i))

myBook.Worksheets(1).Range("A2").CurrentRegion.Cop y _
ThisWorkbook.Sheets(1).Range("A65536").End(xlUp)(2 )
*****Don't want everything - just row 2 ***********
myBook.Close False

Next i

Else: MsgBox "There were no files found."

End If

End With

With Application

.EnableEvents = True

.DisplayAlerts = True

.Calculation = myCalc

End With



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
Can you change current small text in a cell to CAPITALS? Chris K[_2_] Excel Discussion (Misc queries) 3 December 18th 09 01:08 AM
Need Help - Small Macro [email protected] Excel Programming 3 November 17th 07 03:46 AM
Scroll Bar / Spin Button Small Change value PCH Excel Programming 1 October 4th 06 06:57 AM
How to change cases from small to capital in all cells? Khoshravan Setting up and Configuration of Excel 3 September 18th 06 09:26 PM
How do I change the Excel 2000 sheet tab size? It's too small. Kelli Excel Discussion (Misc queries) 14 February 5th 05 05:03 PM


All times are GMT +1. The time now is 06:04 PM.

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"