Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
Need a code (one that triggers on save).
Whenever a change is saved on THIS sheet (in this workbook): update the next available row on: another sheet in another workbook. C:\Documents and Settings\Administrator\Desktop\[master.request.xls]Sheet1 Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
When you say a change is "saved" on a sheet what do you mean? Do you
mean when the cell contents are changed? If you mean when the workbook is saved, you can use the BeforeSave event. Put this code in the ThisWorkbook module. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'your code goes here End Sub Mark J.W. Aldridge wrote: Need a code (one that triggers on save). Whenever a change is saved on THIS sheet (in this workbook): update the next available row on: another sheet in another workbook. C:\Documents and Settings\Administrator\Desktop\[master.request.xls]Sheet1 Is this possible? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
Unfortunately, that's where I need help. ....with the code. I guess it can be either a change event or as the example above. Thanx |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
There is also a Change event for a worksheet.
Private Sub Worksheet_Change(ByVal Target As Range) Target.Copy Windows("master.request.xls").Activate Sheets("Sheet1").Select ActiveSheet.Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial (xlPasteAll) ThisWorkbook.Activate End Sub Mark J.W. Aldridge wrote: Unfortunately, that's where I need help. ....with the code. I guess it can be either a change event or as the example above. Thanx |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
THANX! One question, where do I put the address to the master.request? It is located in a different location. B:\S. Drive Backup\[master.request.xls]Sheet3 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
THANX!
However, could I insert the complete address to the master.request sheet? It is stored in a different place. B:\S. Drive Backup\[master.request.xls]Sheet3 I tried just placing it where master.request is in the code above but got errors. Thanx. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
When you ask where could you insert the complete address, what are you
intending to do with it? The code I gave you assumes the workbook is already open. If it is already open, you could use the complete address to save a copy of the file there. If the file is not already open, you could use the complete address to open the file. Can you be more specific about what you intend to do with the complete address? Mark J.W. Aldridge wrote: THANX! However, could I insert the complete address to the master.request sheet? It is stored in a different place. B:\S. Drive Backup\[master.request.xls]Sheet3 I tried just placing it where master.request is in the code above but got errors. Thanx. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link two worksheets....
THanx again, The workbook will not be open at the time of update. I tried placing the address in the code above (with the complete directive address) and i got an error. I think this just may be a directive problem when including the entire address/directive vs. the sheet name. ( quotation mark vs. carrot). Thanx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Link to Worksheets | Excel Discussion (Misc queries) | |||
link to other worksheets | Excel Discussion (Misc queries) | |||
how to link worksheets | Excel Worksheet Functions | |||
How do I link to other worksheets | Excel Worksheet Functions | |||
How do I Link two worksheets? | Excel Worksheet Functions |