Find record, copy info from specific cell on one workbook and paste into a different cell in 2nd workbook

Kindrex

New Member
Joined
Jul 17, 2018
Messages
3
Hi all

I have lurked on here for a while and found it a great help in my travels. I hope you can help me on my first post !

I have two workbooks. "END" which contains a large record per row, I press a button on this and it send a condensed version to a separate workbook "MIDDLE".

The user then acknowledges the record via a user form which adds a digital signature.

I want a code that enables me to press a button in the END which will pull the digital signature from MIDDLE and attach it to the correct record in END.

I can get it working if the button was in MIDDLE , but the end user ultimately will not have access to the drive END is stored in.

I've attached my code below as a start point. Needless to say I can't get it to work.

Code:
From middle to front

Option Explicit

Private Sub Continue_BUTTON_Click()

''BEGIN OPEN & CLOSE'''
Dim xlBook As Workbook
Dim xlSheet As Worksheet
Dim fso As Object
 
Const strPath As String = "C:\Users\Me\" 
Const strName As String = " MIDDLE.xlsm" 
 
    Set fso = CreateObject("Scripting.FileSystemObject")
     
    On Error Resume Next
    Set xlBook = Workbooks(strName) 'see if the book is open
    If xlBook Is Nothing Then 'if not open it
        Set xlBook = Workbooks.Open(strPath & strName)
    End If
    Set xlSheet = xlBook.Sheets("Middle_Raw_Data")
    With xlSheet

            
        '''BEGIN SEARCH
        Dim ResponseRec As String
        Dim finalrow As Integer
        Dim i As Integer 'row counter 
        Dim targetrow As Integer 
        Dim DigSig As String 
                
        ResponseRec = "Yes"
        finalrow = Sheets("Middle_Raw_Data").Range("B10008").End(xlUp).Row


        For i = 2 To finalrow
            If Cells(i, 23) = ResponseRec Then
                Entryrow = Range(Cells(i, 5))
                Targetrow = Range(Cells(i, 5))
                DigSig = Range(Cells(i, 23))

    Sheets("Middle_Raw_Data").Range("Data_Start_1D").Offset(EntryRow, 5).Value = “Yes – Submitted”   ‘update record in MIDDLE
    Workbook(“END”).Sheets("END_Raw_Data").Range("Data_Start_FPOC").Offset(TargetRow, 35).Value = DigSig ‘update record in END

            End If

        Next i   ‘rinse and repeat

        '''END SEARCH 

    Sheets("Feedback_Raw_Data").Range("Data_Start_1D").Offset(TargetRow, 20).Value = DigitalSig
    Sheets("Feedback_Raw_Data").Range("Data_Start_1D").Offset(TargetRow, 21).Value = "Yes"

    End With
    ''END OPEN & CLOSE'''

Workbooks("MIDDLE.xlsm").Save
Workbooks("MIDDLE.xlsm").Close

End Sub

Something to add is MIDDLE holds multiple records all of which will not have a digital signature yet. Hence the search function to find those that do.

I hope my explanation makes sense? Thanks in advance!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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