How to Auto fill an existing line item with more information with VB

UMAKEMESIK

Active Member
Joined
Oct 3, 2005
Messages
378
Hello to all,

We have a workseet that is filled by multiple users.
Once 8 cells are filled out the user clicks on a submit button.

An oder entry Log is opened and the data from the 8 cells from
the worksheet are placed onto the next open line on the log.

should not matter in this scenario but the first entry onto the log
is Hyperlinked back to the original worksheet archived on the network.

Here is my code to transfer the data:
Code:
    Dim LastRow As Range
    Dim ws As Worksheet
        Set ws = Sheets("Worksheet")
        
        
  
        
    Workbooks.Open Filename:="R:\General\COVER SHEET_Protective\Protective Packaging Order Log.xlsm", Password:="PP", WriteResPassword:="PP"
       
        
        Set LastRow = Sheets("ORDER LOG").Cells(Rows.Count, 1).End(xlUp)
            
            With LastRow
            
.Offset(1, 0) = ws.[G3]
                  ActiveSheet.Hyperlinks.Add Anchor:=.Offset(1), _
 Address:="R:\General\COVER SHEET_Protective\" & Range("B2") & "\" & Range("C3") & "\" & Range("G3") & " - Order.xlsm"
 

  .Offset(1).Font.Size = 14
             
                .Offset(1, 1) = ws.[B2]
                .Offset(1, 2) = ws.[C3]
                .Offset(1, 3) = ws.[G7]
                .Offset(1, 4) = ws.[c7]
                .Offset(1, 5) = ws.[G5]
                .Offset(1, 6) = ws.[D10]
                .Offset(1, 7) = ws.[D11]
                .Offset(1, 8) = ws.[D12]
                
                 End With
            ActiveWorkbook.Save

this is the first entry on the log:
Code:
.Offset(1, 0) = ws.[G3]

We would like to go back to the original worksheet
open up, fill out some missing data from 2 additional cells
then hit a second Submit button

This time the worksheet will look for the original line item
on the log and update with only the data from the 2 added
cells of information.

on the log I can place the missing data columns at the end of the
log worksheet.

Any help would be much appreciated.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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