Suryaprakash
New Member
- Joined
- Aug 1, 2011
- Messages
- 41
I wish to open each xls file one by one in the main directory D:\BRDSORT and each of it's subdirectories upto 2 levels and run the following macro on Sheet1 of each file.
Macro:
Sub Highlight()
Range("E9:H13").Select
With Selection.Interior
.ColorIndex = 34
.Pattern = xlSolid
End With
Range("I9:L13").Select
With Selection.Interior
.ColorIndex = 40
.Pattern = xlSolid
End With
Range("G16").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
I would appreciate any help with a code to carry out this task.
Macro:
Sub Highlight()
Range("E9:H13").Select
With Selection.Interior
.ColorIndex = 34
.Pattern = xlSolid
End With
Range("I9:L13").Select
With Selection.Interior
.ColorIndex = 40
.Pattern = xlSolid
End With
Range("G16").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
I would appreciate any help with a code to carry out this task.