M
M Shannon
Hi there,
I have this problem - I know nothing about VB for excel
but need a script doing.
I have two files, one called CW Tracker and another called
cw_tracker_data.
When I open the CW Tracker file I have a worksheet that
has a button. When the button is clicked I want it to go
to a worksheet called CW Tracker and delete the contents.
Then I want it to open the file called cw_tracker_data and
copy the data. (There is only one worksheet). Then I want
it to go back to the CW Tracker file and paste the data to
the worksheet called CW Tracker. Then I want it to hide
the two worksheets not needed to view a summary worksheet.
So far this is what I have.
Private Sub Update_Worksheet_Click()
'Selects the CW Tracker worksheet
Sheets("CW Tracker").Select
'Selects range A1:F25000
Sheet3.Range("A1:F25000").Select
'Deletes the contents of those cells
Selection.ClearContents
'Opens the cw_tracker_data file
Workbooks.Open Filename:="C:\cw_tracker_data.xls"
'Selects the cw_tracker_data worksheet
'Copies the data
'Selects the CW Tracker worksheet
'Pastes the data
'Hides the CW Tracker worksheet
'Hides the Update File worksheet
'Closes the cw_tracker_data file
Any help is much appreciated.
Many thanks in advance.
I have this problem - I know nothing about VB for excel
but need a script doing.
I have two files, one called CW Tracker and another called
cw_tracker_data.
When I open the CW Tracker file I have a worksheet that
has a button. When the button is clicked I want it to go
to a worksheet called CW Tracker and delete the contents.
Then I want it to open the file called cw_tracker_data and
copy the data. (There is only one worksheet). Then I want
it to go back to the CW Tracker file and paste the data to
the worksheet called CW Tracker. Then I want it to hide
the two worksheets not needed to view a summary worksheet.
So far this is what I have.
Private Sub Update_Worksheet_Click()
'Selects the CW Tracker worksheet
Sheets("CW Tracker").Select
'Selects range A1:F25000
Sheet3.Range("A1:F25000").Select
'Deletes the contents of those cells
Selection.ClearContents
'Opens the cw_tracker_data file
Workbooks.Open Filename:="C:\cw_tracker_data.xls"
'Selects the cw_tracker_data worksheet
'Copies the data
'Selects the CW Tracker worksheet
'Pastes the data
'Hides the CW Tracker worksheet
'Hides the Update File worksheet
'Closes the cw_tracker_data file
Any help is much appreciated.
Many thanks in advance.