Hello,
I am trying to use VBA to write a code to make it possible to link two cells together from different worksheets, but it needs to be linked both ways. When I input a number/date/word, I need it to update it in a particular cell on another worksheet and vice versa. For example, I need cells in column A (Transaction Number) in SHEET1 to be linked to cells in column D (Transaction Number) in SHEET2 [and vice versa]. I am not sure if you can link all cells in one column to all cells in another column, but I found a macro that I could copy the code and change the cell # to cover the cells needed. The problem I am running into, however, is that I can get the code to cover A2 all the way up to A120, but if I go any bigger then I get an error saying that the procedure is too large. I tried to make it shorter by using the same name twice (which I get the error "Ambiguous Name Detected." I know you cannot have the same name twice, but if I change it then the code does not work. For example, the name was: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) and the name I changed the second one to was: Private Sub Workbook_SheetChange1(ByVal Sh As Object, ByVal Target As Range). I am not sure how to either change the name so that it will work, or shorten the macro. I am sure there is a more efficient way to write this code, but I am very new to this. Any help would be much appreciated!
Attached is the excel workbook that I am using. To view the code, right-click SHEET1 and then click THIS WORKBOOK. The code I am using here is the one where I get the "Procedure Too Large" Error: [*Code courtesy of Dave Hawley from a different forum website that I found, where he posted it in response to someone's question]
PO & SO TRACKING SHEET.xlsmPO & SO TRACKING SHEET.xlsm
Bookmarks