Hi Everyone!
I'm learning VB by applying some automation to an Excel Workbook. So far, I've been able to:
1) Program a Combobox control so that every time a Userform is activated, the contents of the column of a sheet are loaded in this control.
2) Every time an item of the list contained in the combobox is selected, a listbox control is loaded with data of several other sheets corresponding to the selected item of the combobox. This data is ordered/sorted by date in a descending order. In other words, the most recent date is the first item on the list and the last item corresponds to the oldest set of information.
3) When an item of the listbox control is clicked, a number of textbox controls are loaded with the corresponding data.
4) Together with the last step, a chart that graphiclly displays some of the data on the listbox control is generated. It displays the last 24 months of information prior to the selected date (the date is contained in the first column of the listbox control).
All of this works fine, now, what I want to do is for the user to be able to DOUBLE CLICK the item so that the chart reflects the last 24 months prior to the date selected. In other words, I want to separate the Click Event (to ONLY load the textbox controls with data) and the DBCLICK event to change the chart accordingly. The problem is that the DBClICK event is not activaded with a double click no matter how fast I click the mouse button. Can anyone please give me a short example of how to use the Click and DbCLICK events together. I have the idea that it's got to do with the Mouse Up/Down events but I it's not very clear to me exactly how.
I Decided to upload the file I'm working on so it's easier to see what I'm trying to do here. To activate the Userform, simply select the sheet named "AUTOMATION".
For any information Thanks a lot!
Hi Everyone!
I'm learning VB by applying some automation to an Excel Workbook. So far, I've been able to:
1) Program a Combobox control so that every time a Userform is activated, the contents of the column of a sheet are loaded in this control.
2) Every time an item of the list contained in the combobox is selected, a listbox control is loaded with data of several other sheets corresponding to the selected item of the combobox. This data is ordered/sorted by date in a descending order. In other words, the most recent date is the first item on the list and the last item corresponds to the oldest set of information.
3) When an item of the listbox control is clicked, a number of textbox controls are loaded with the corresponding data.
4) Together with the last step, a chart that graphiclly displays some of the data on the listbox control is generated. It displays the last 24 months of information prior to the selected date (the date is contained in the first column of the listbox control).
All of this works fine, now, what I want to do is for the user to be able to DOUBLE CLICK the item so that the chart reflects the last 24 months prior to the date selected. In other words, I want to separate the Click Event (to ONLY load the textbox controls with data) and the DBCLICK event to change the chart accordingly. The problem is that the DBClICK event is not activaded with a double click no matter how fast I click the mouse button. Can anyone please give me a short example of how to use the Click and DbCLICK events together. I have the idea that it's got to do with the Mouse Up/Down events but I it's not very clear to me exactly how.
Previoulsly I Uploaded a file with some minor adjustments File-Size wise so it could be Uploaded but it had a little problem. Here is the file I'm working on.
For any information Thanks a lot!
Bookmarks