Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
XL 2000: automating drag-and-drop for worksheet ranges. Using Code!
I'm afraid I haven't clue how to answer your question.
Only responding because a) it's been hanging around, and b) your OP is close to one I posted to which someone has been good enough to answer (namely Tom Ogilvy). So, my suggestion is to elaborate on your ultimate objective. Eg why do you want to automate Worksheet drag & drop. If it’s about move/copy ranges with mouse, events would be triggered on select and change if you need to trap these. Or maybe it concerns move/resize objects. Hopefully if you explain a little more someone far more expert might suggest an alternative approach. Good luck, Dan -----Original Message----- Hello; I have been looking for a solution that will enabled the automation of drag-and-drop functionality for worksheet ranges. I have been looking at the different events which the application and worksheet objects expose but they are not workable for what I need to do. I've also looked at windows api functions that may help but the problem here is that one still needs a triggering mechanism for these to work. Only fall back is, again, the application and worksheet events, which are not workable. I wonder if there is a way to create a user defined event and somehow hook it up to the app so that it recognizes it? Perhaps is there a way to register events with the app via the registry or some other method? Thanks in advance for your help and/or suggestions. . |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
XL 2000: automating drag-and-drop for worksheet ranges. Using Code!
I think what you are asking is impossible. "Click, Hold, and Drag" already is assigned to a
function: extending the selection. Even if you could implement this, I wouldn't recommend it unless your users never use Excel for anything other than your application, or for that matter, any other Windows apps. Click, Hold and Drag extends the selection in every other Windows app that I can think of. So you're really trying to change some fundamental Windows behavior. As far as controlling what users can and can't do, doesn't protecting the worksheet give you the control you need? Another option would be to get all user input via Forms and not allow the user to manipulate the worksheet at all. On Tue, 2 Sep 2003 11:37:47 -0700, "Bill Garcia" wrote: Good suggestion. Here is the problem in a nut shell. In XL when the user selects a cell, the default behaviour is for the cell to become activated. If after selecting, the user holds the left mouse button down while dragging, a range of cells is highlighted. However If the user wants to move the cell to another address, he/she must then select the border of the cell, hold down the mouse button and then drag it to the new destination. I want to click, hold and drag all in one step without having to first select the cell, then the border. It is all about controlling the UI and what I want the users to do and not to do. I realize this is not a regular question. I think this extends beyond the confines of the environment. But, hopefully not, somehow the application knows each action. There most be an event that fires when the user drags the pointer over the cell's border. This most be how the app knows to change the mouse from xlDefault to xlNorthWest. This is the event I want to tap into, but it is not exposed and so far I have not been able to simulate it. Appreciate your comments. Thanks for the help. BG -----Original Message----- I'm afraid I haven't clue how to answer your question. Only responding because a) it's been hanging around, and b) your OP is close to one I posted to which someone has been good enough to answer (namely Tom Ogilvy). So, my suggestion is to elaborate on your ultimate objective. Eg why do you want to automate Worksheet drag & drop. If it's about move/copy ranges with mouse, events would be triggered on select and change if you need to trap these. Or maybe it concerns move/resize objects. Hopefully if you explain a little more someone far more expert might suggest an alternative approach. Good luck, Dan -----Original Message----- Hello; I have been looking for a solution that will enabled the automation of drag-and-drop functionality for worksheet ranges. I have been looking at the different events which the application and worksheet objects expose but they are not workable for what I need to do. I've also looked at windows api functions that may help but the problem here is that one still needs a triggering mechanism for these to work. Only fall back is, again, the application and worksheet events, which are not workable. I wonder if there is a way to create a user defined event and somehow hook it up to the app so that it recognizes it? Perhaps is there a way to register events with the app via the registry or some other method? Thanks in advance for your help and/or suggestions. . . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
XL 2000: automating drag-and-drop for worksheet ranges. Using Code!
Come on this is a computer, only limits are those which we
put on them. If you tell me that is a limitation of the application I aggree, except this is an OLE app. As far as the users never using excel for anything else or fundamental windows functionality. I take advantage of this seemingly fundamental behaviour, for the average user, but we control the behaviour. I'm only trying to achieve a mode, a state, nothing that couldn't be restored by simply reseting the app on sheet_change event. Totaly outside of the operating system. Thanks for the help. BG -----Original Message----- I think what you are asking is impossible. "Click, Hold, and Drag" already is assigned to a function: extending the selection. Even if you could implement this, I wouldn't recommend it unless your users never use Excel for anything other than your application, or for that matter, any other Windows apps. Click, Hold and Drag extends the selection in every other Windows app that I can think of. So you're really trying to change some fundamental Windows behavior. As far as controlling what users can and can't do, doesn't protecting the worksheet give you the control you need? Another option would be to get all user input via Forms and not allow the user to manipulate the worksheet at all. On Tue, 2 Sep 2003 11:37:47 -0700, "Bill Garcia" wrote: Good suggestion. Here is the problem in a nut shell. In XL when the user selects a cell, the default behaviour is for the cell to become activated. If after selecting, the user holds the left mouse button down while dragging, a range of cells is highlighted. However If the user wants to move the cell to another address, he/she must then select the border of the cell, hold down the mouse button and then drag it to the new destination. I want to click, hold and drag all in one step without having to first select the cell, then the border. It is all about controlling the UI and what I want the users to do and not to do. I realize this is not a regular question. I think this extends beyond the confines of the environment. But, hopefully not, somehow the application knows each action. There most be an event that fires when the user drags the pointer over the cell's border. This most be how the app knows to change the mouse from xlDefault to xlNorthWest. This is the event I want to tap into, but it is not exposed and so far I have not been able to simulate it. Appreciate your comments. Thanks for the help. BG -----Original Message----- I'm afraid I haven't clue how to answer your question. Only responding because a) it's been hanging around, and b) your OP is close to one I posted to which someone has been good enough to answer (namely Tom Ogilvy). So, my suggestion is to elaborate on your ultimate objective. Eg why do you want to automate Worksheet drag & drop. If it's about move/copy ranges with mouse, events would be triggered on select and change if you need to trap these. Or maybe it concerns move/resize objects. Hopefully if you explain a little more someone far more expert might suggest an alternative approach. Good luck, Dan -----Original Message----- Hello; I have been looking for a solution that will enabled the automation of drag-and-drop functionality for worksheet ranges. I have been looking at the different events which the application and worksheet objects expose but they are not workable for what I need to do. I've also looked at windows api functions that may help but the problem here is that one still needs a triggering mechanism for these to work. Only fall back is, again, the application and worksheet events, which are not workable. I wonder if there is a way to create a user defined event and somehow hook it up to the app so that it recognizes it? Perhaps is there a way to register events with the app via the registry or some other method? Thanks in advance for your help and/or suggestions. . . . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
XL 2000: automating drag-and-drop for worksheet ranges. Using Code!
On Tue, 2 Sep 2003 13:37:17 -0700, "Bill Garcia" wrote:
I'm only trying to achieve a mode, a state, nothing that couldn't be restored by simply reseting the app on sheet_change event. Except that Excel wasn't programmed to behave this way. I that's what you want, I think you'll have to program it yourself, "from the ground up", outside of Excel. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Drag & Drop | Excel Worksheet Functions | |||
unable to drag scrollbar in excell 2000 | Excel Discussion (Misc queries) | |||
Drag and drop | New Users to Excel | |||
Excel 2003 Multi-worksheet copy via drag/drop | Excel Worksheet Functions | |||
Automating Excel Cell Drag and Drop | Excel Programming |