Hi All,

Hope you can help, you normally can!

I am running a spreadsheet, as a logbook on a piece of equipment.
Each time the operator enters data they save the spreadsheet, but dont close it.

Therefore I have a seperate spreadsheet on my PC that access the last saved copy of the spreadsheet and copies the page of data to the new spreadsheet. The first spreadsheet is then closed. The data is then edited to remove 3 empty rows. Finally the data is sorted by column C and then column B in ascending order.

To perform all this in an automated way, I recorder a macro with me performing the functions as I wanted.

All worked well, but since the log has been updated by the operator, the sort nolonger works properly. Can someone suggest where the macro below needs changing, or if there is a better way to achieve what I want.

Thanks,
Gavin.

Sub Macro1()
'
' Macro1 Macro
'

'
ChDir "T:\SST\CCD\Engineering\Backthin_data\DryEtch"
Workbooks.Open Filename:= _
"T:\SST\CCD\Engineering\Backthin_data\DryEtch\Dry_etcher_log.xls", Notify:= _
False
Sheets("Calc Sheet").Select
Cells.Select
Range("E1").Activate
Selection.Copy
Windows("Chart Sort Macro.xls").Activate
ActiveSheet.Paste
Windows("Dry_etcher_log.xls").Activate
ActiveWindow.Close
Range("A2:G4").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Columns("A2:G1000").Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:=Range("B2") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Range("A1").Select
Sheets("Chart1").Select
End Sub