Hi,
Each link goes to a different worksheet as they are variation sheets.
The Workbook is Setup as follows:
Register Sheet - This has the table where we are creating a new row each time when the code u gave me is run.
The new row is for the new variation that is being created and then specific cells in the new row need to link to specific cells in the newly created sheet.
Variation Sheet - Stores all the core data that is linked back to the register and to a particular row, each variation sheet has new data.
I was just thinking that you can get the info to link back if you used a script similar to the "InsertRowsAndFillFormulas" and then instead of creating a new row you go up a row and then link each cell from the new sheet to the register.
i.e
##Tab Works##
##Copy Cells doesn't work with the way i'm doing it and i don't know vba well enough to manipulate your previous code to make my idea work###
The Idea with rval is that it finds the last empty row and then goes back one to place the code on the newly create row and then uses the var VQ to place the new location of the sheet that's being referenced.
My rval code doesn't work but you're code does the same thing but as I said i'm not sure how to manipulate it to make it work with my code.
Sub CopyCells()
'
' CopyCells Macro
Dim rval As String
ID = Cells(1, 22).value
If ID = 1 Then
Sheets("Register").Select
rval = 10
While Not Cells(rval, 1).value = ""
rval = rval + 1
Wend
rval = rval - 1
End If
VQ = Cells(1, 20)
ActiveCell.FormulaR1C1 = "='VQ'!R[-17]C[-1]"
Cells(rval, 5).Select
ActiveCell.FormulaR1C1 = "='VQ'!R[12]C[6]"
Range("rval,1").Select
ActiveCell.FormulaR1C1 = "='VQ'!R[-18]C[1]"
Range("rval,2").Select
ActiveCell.FormulaR1C1 = "='VQ!R[-22]C[8]"
Range("rval,2").Select
End Sub
I hope things are more clear now
Bookmarks