Hello,
I am very new at writing vba. I copied a code that takes information entered from one workbook by hitting the submit button it then takes my data, opens the master log, transfers the data onto the worksheet horizontally, saves and closes both workbooks. example below of code being used.
Sub Button3_Click()
Dim mydata As Workbook
Worksheets("Secondary").Select
current = Range("I5")
Set mydata = Workbooks.Open("C:\Users\jjc\Documents\Master Secondary Sheet\Master Secondary Log.xlsx")
Worksheets("Sheet1").Select
Worksheets("Sheet1").Range("A1").Select
RowCount = Worksheets("Sheet1").Range("A1").CurrentRegion.Rows.Count
With Worksheets("Sheet1").Range("A1")
.Offset(RowCount, 0) = current
How do I continue the code to take other cells/ranges on the original worksheet and copy them to the master log workbook to the next row, there will be 4 sets of rows with the same header information entered each time the submit button is pushed? The spreadsheet is set up to allow our technician to review our product from different shifts/different run times/ different defect codes, different date of inspection but same job number. I hope that I am not as confusing to you as I am to myself in trying to take the basic information entered and just sort it to different rows on the master log. Thank you in advance for your insight/help.
I am very new at writing vba. I copied a code that takes information entered from one workbook by hitting the submit button it then takes my data, opens the master log, transfers the data onto the worksheet horizontally, saves and closes both workbooks. example below of code being used.
Sub Button3_Click()
Dim mydata As Workbook
Worksheets("Secondary").Select
current = Range("I5")
Set mydata = Workbooks.Open("C:\Users\jjc\Documents\Master Secondary Sheet\Master Secondary Log.xlsx")
Worksheets("Sheet1").Select
Worksheets("Sheet1").Range("A1").Select
RowCount = Worksheets("Sheet1").Range("A1").CurrentRegion.Rows.Count
With Worksheets("Sheet1").Range("A1")
.Offset(RowCount, 0) = current
How do I continue the code to take other cells/ranges on the original worksheet and copy them to the master log workbook to the next row, there will be 4 sets of rows with the same header information entered each time the submit button is pushed? The spreadsheet is set up to allow our technician to review our product from different shifts/different run times/ different defect codes, different date of inspection but same job number. I hope that I am not as confusing to you as I am to myself in trying to take the basic information entered and just sort it to different rows on the master log. Thank you in advance for your insight/help.