copy workbook data into web adi excel workbook

jaik22

Board Regular
Joined
Sep 23, 2016
Messages
102
Code:
          Dim org As Workbook: Set org = ActiveWorkbook

    Dim temp As Workbook: Dim mPath As String: mPath = org.Worksheets("TEMP").Range("s7").Value


    On Error Resume Next
    Workbooks.Open filename:=mPath
    ActiveWorkbook.Activate
    Range("k6").Copy
    temp.Activate


    On Error Resume Next
    Range("e19").Select
    On Error Resume Next
     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
      ActiveWorkbook.Activate
      Range("n6").Copy
      temp.Activate


    On Error Resume Next
    Range("e20").Select
    On Error Resume Next
     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

Hi, I am trying to copy workbook's data and paste it into oracle web adi workbook template. However, the macro is not picking up the k6, n6 values to store into the template's e19 and e20 rows. So template's e19-20 rows are empty after running the macro.
Is there any way to fix this issue?

Thank you!
 
Last edited:

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi Jaink
I would use something more concise like
Code:
 'Set Values Between Workbooks    
    Workbooks("book2.xlsm").Worksheets("sheet1").range("E19").value = _
    Workbooks("book1.xlsm").Worksheets("sheet1").range("K6").value
    Workbooks("book2.xlsm").Worksheets("sheet1").range("E20").value = _
    Workbooks("book1.xlsm").Worksheets("sheet1").range("N6").value
Remember to change workbooks names and sheets names to your needs
Cheers
Sergio
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

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