Excel 2 workbooks coping data issues

Ady12

New Member
Joined
Jun 6, 2011
Messages
2
I have the following problem / challenge

Workbook 1 (starts life as a generic template but could be called anything), use opens and runs macro

Macro opens file browser to locate Workbook 2 (could be anyname)

macro then needs to copy 2 sheets from Workbook 2 and paste to Workbook 1

Workbook 2 then can be closed - no changes needed

I have been researching this across the net and tried a number of solutions but am getting no where.:(:confused:

Please help
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Here is the code to date - currently falls over at the :confused:

Sub ActiveBookName()
Dim RiskFile
RiskFile = Application.ActiveWorkbook.Name

'Locate&OpenSourceFile
Dim SourceFile
SourceFile = Application.GetOpenFilename("Excel files,*.xl?", 1)
If SourceFile = False Then Exit Sub
Workbooks.Open Filename:=SourceFile
'CopyData()

Sheets("Std.Pre-qualification Questions").Select
Cells.Select
Selection.copy
Range("A1").Select
Windows(RiskFile).Activate
Sheets("Pre-Qual Questionnaire").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Application.CutCopyMode = False
Windows(SourceFile).Activate:confused:
Sheets("Cover").Select
Cells.Select
Selection.copy
Range("A1").Select
Windows(RiskFile).Activate
Sheets("Supplier Information").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Application.CutCopyMode = False
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top