PDA

View Full Version : Drag and Drop



Blue_Bunny
02-26-2008, 10:04 AM
Hello All -

I am creating a workbook that will serve as a front end to build a SQL database.

I envision a solution that will permit the user to highlight a series of columns from a raw data workbook that will ultimately define a table. That is, my objective is to lock down a list of columns from worksheet(1) that will define the columns in a second worksheet or worksheet(2) in the same file. Then, after the user reviews the column list from step 1 they will be able to drag and drop the columns in a particular order and further define the columns. I will end up creating an area within worksheet(2) where these columns can be further defined and manipulated, but I wanted to start with the column definition and drop and drop behavior.

I was thinking of a solution that would not necessarily use the entire column from sheet1, but just the column headings. That made me think of the Pivot Table interface where the user can simply drag different columns into the Row, Column and Data areas of the Pivot Table.


I have spent some time searching the net, but not much luck. Any ideas?

Blue_Bunny
03-10-2008, 11:37 AM
I found this file that contains part of the functionality that I'm seeking.
This file contains a macro linked to a Demo Button that, when pressed, displays a form with an image (star) in the center. The star can be Dragged and Dropped anywhere within the form by the user.

What I would like to do is have the user select a range of columns where the names are displayed instead of the Star that you see in this example.

Blue_Bunny
08-01-2008, 01:50 PM
q

Aussiebear
08-02-2008, 03:20 PM
What about the possibility of the User selecting a number of columns which form a series within a listbox 1. From listbox 1 the user then selects each column option in order of preference which goes into listbox 2. A command button then processes the listing into worksheet 2.

Just an idea...

mdmackillop
08-02-2008, 05:36 PM
Have a look at this question (http://www.vbaexpress.com/forum/showthread.php?t=454&highlight=drag+listbox); also try a search on ListBox Drag in the advanced search for some other items

Blue_Bunny
08-04-2008, 06:03 AM
Thanks mdmackillop and Aussiebear for your recommendations. I will give them a try and post what I come up with.

BB