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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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,214,808
Messages
6,121,681
Members
449,048
Latest member
81jamesacct

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