![]() |
On Double Click - Filter Transactions to New WorkSheet
Hi All,
I've been putting together a basic financial report utility that imports data for a specific cost centre using SQL and does a whole range of array formulas in a predefined layout and does some nice little charting. This utility then copies the 'cover page', 'Report' and 'Data' tab to a new workbook as values only. Saves the file and then emails the newly created workbook to whomever it needs to go to. The managers have asked for something which has got me scratching my head. I know it can be done as I've seen it done before. Essentially, what they want to do is to be able to click on a given 'chart account' and filter the transactions based on what they've selected. My thoughts are.... If a user 'double clicks' on a row, it will 'auto filter' the data based on the value in column H and the row they've clicked on "if there is a code available" I think the best way forward, to make it simple for the users is to just have the 'Data' filter based on what is selected. The next thing I need to do is copy the VBA module to the new workbook. Any tips would be sincerely appreciated. |
On Double Click - Filter Transactions to New WorkSheet
Hi Steven,
Am Wed, 6 Nov 2013 20:51:33 -0800 (PST) schrieb Steven North: If a user 'double clicks' on a row, it will 'auto filter' the data based on the value in column H and the row they've clicked on "if there is a code available" the user should double click in column H in the cell with the expected value: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) If Target.Column < 8 Then Exit Sub ActiveSheet.UsedRange.AutoFilter field:=8, _ Criteria1:=Target.Value Cancel = True End Sub Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
All times are GMT +1. The time now is 10:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com