excel vba - Copy a line to a DB sheet based on a calculated trigger -
after trying few different approaches stuck. have table line completed every 30 mins or so. user enter 3 numbers in row, next 3 rows calculated. use 1 of calculated rows trigger copy entire row db sheet (sheet2). , repeat when next line added , on. can seem 1st line copy across every time.
the sheet used hardcopy batch record have shied away building form. started following, worked line 1 (also calling recorded macro copy in header data)
`private sub worksheet_calculate() if isnumeric(range("$h$9")) if range("$h$9").value >= 1 application.run "macro1" end if end if end sub `
macro1 copying of header form data (date/time,machine info etc entered once sheet & row described above).
i hope clear, questions please let me know
welcome so
try using loop below? change upper limit of i
want, , maybe use form of row counter cells(rows.count, 1).end(xlup).row
private sub worksheet_calculate() dim integer = 1 9000 if isnumeric(cells(i, 8)) if cells(i, 8).value >= 1 application.run "macro1" end if end if next end sub
Comments
Post a Comment