![]() |
Generate list in separate workbook
Hi, I have this code in a workbook and the events in one sheet go to another
sheet creating a list. (Thanks to Jim Thomlinson) Is there a way to get it to create the list in another excel file that I have saved? And also, how could I get it to create a column in the list that says which workbook the information has come from. eg. the code below is in file "7A1.xls" and the list is generated in SIO.xls how can I list the 7A1 file name in a column? Many thanks. Paul. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim rng As Range Cancel = True If Target.Row = 1 Then Target.Value = Date Else Select Case Target.Value Case Empty Target.Value = "x" Case "x" Target.Value = "xx" Case "xx" Target.Value = 15 Set rng = Sheets("SIOs").Cells(Rows.Count, _ "A").End(xlUp).Offset(1, 0) rng.Value = Cells(Target.Row, "A").Value rng.Offset(0, 1).Value = Cells(1, Target.Column).Value End Select End If End Sub |
All times are GMT +1. The time now is 07:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com