demonact
03-13-2016, 06:58 AM
Hi everyone,
Urgent help needed here. I need to import a whole worksheet(sheet1) from a closed workbook(testing) in a shared drive to another worksheet(scorecard) in another workbook(named Performance) which will be opened. This should be done by clicking a button in the worksheet named scorecard. Can anyone here kindly help me out with it?
Sub copypaste()
Workbooks.OpenText Filename:=" C:\ "
Range("A1:AZ50").Copy
Workbooks("Performance.xlsm").Activate
Sheets("scorecard").Select
Range("A1:AZ50").Select
ActiveSheet.Paste
Workbooks("testing").Close SaveChanges:=False
End Sub
Can anyone here help me out with this code? Thank you! By the way, what is the syntax in writing the filepath in VBA?
Urgent help needed here. I need to import a whole worksheet(sheet1) from a closed workbook(testing) in a shared drive to another worksheet(scorecard) in another workbook(named Performance) which will be opened. This should be done by clicking a button in the worksheet named scorecard. Can anyone here kindly help me out with it?
Sub copypaste()
Workbooks.OpenText Filename:=" C:\ "
Range("A1:AZ50").Copy
Workbooks("Performance.xlsm").Activate
Sheets("scorecard").Select
Range("A1:AZ50").Select
ActiveSheet.Paste
Workbooks("testing").Close SaveChanges:=False
End Sub
Can anyone here help me out with this code? Thank you! By the way, what is the syntax in writing the filepath in VBA?