Hi Folks,
I have two workbooks which will be open constantly on two seperate PCs.
Workbook1 will be pasting information at regular intervals to an "Archive" workbook located in G:Drive. This will be done by an operator as and when required throughout a shift.
Workbook2 will be accessing this "Archive" workbook at regular intervals and copying the information into workbook2. At the moment it does this transfer by using a "UpDate" commandbutton located on a Worksheet in Workbook2.
The code for this "UpDate" commandbutton is:
The above code works fine and although it might be a long winded way around getting information from one sheet to another it is quite stable. By that i mean if we have a powercut or pc crashes we will only loose minimal information.
What i want to know is if it is possible to:
I would really be gratefull for any help or guidance with a code for this problem.
Thanks
I have two workbooks which will be open constantly on two seperate PCs.
Workbook1 will be pasting information at regular intervals to an "Archive" workbook located in G:Drive. This will be done by an operator as and when required throughout a shift.
Workbook2 will be accessing this "Archive" workbook at regular intervals and copying the information into workbook2. At the moment it does this transfer by using a "UpDate" commandbutton located on a Worksheet in Workbook2.
The code for this "UpDate" commandbutton is:
Code:
Private Sub UpDateButton_Click()
Application.ScreenUpdating = False
'*****************************************************************************
'This code UPDATES this Workbook information in Shift Manager Screen from
'the Transfers Sheet located in workbook "HandPack Archive.xls" further
'located in G:drive
Dim TRA, SMS As Worksheet
Set SMS = Sheets("Shift Manager Screen") 'This refers to worksheet in this workbook
Workbooks.Open Filename:="G:\Cwmbran-new\Warehouse\lean manu\" & _
"HandPack Archive.xls" 'This opens the other workbook
Set TRA = Sheets("Transfers") 'This refers to worksheet in other workbook
With TRA
SMS.Range("G8") = TRA.Range("B7") 'Completed Jobs
SMS.Range("D8") = TRA.Range("B9") 'Total Discs Packed
SMS.Range("F9") = TRA.Range("B5") ' Current Shift
SMS.Range("E10") = TRA.Range("B11") 'Jobs In Quarantine
End With
ActiveWorkbook.Save 'Saves the other workbook
ActiveWorkbook.Close 'Closes the other workbook
'*****************************************************************************
Application.ScreenUpdating = True
End Sub
What i want to know is if it is possible to:
- 1. Activate the "UpDate" commandbutton/code automatically at set intervals instead of an operator doing it manually. This way i could remove or make the button invisible.
2. Activate the "UpDate" commandbutton automatically when the workbook is first opened. This is just as a precaution in case pc crashes etc. So when re-opened it is immediatly back uptodate.
I would really be gratefull for any help or guidance with a code for this problem.
Thanks