Stop Drag And Drop Across A Row
Jan 14, 2010How can I stop drag and drop across a row but you can drag and drop down a column.
How can I stop drag and drop across a row but you can drag and drop down a column.
I have a sheet where users enter a date and other details on each row.
The number of rows where data is entered can be upto 20 at any one time.
I wish to allow users to drag the cell date down for the number of rows they wish, without the date incrementing.
When I drag a text file from my desktop into an existing Excel worksheet it automatically creates a new workbook. I'd like to know how to modify this such that I can drop the file into my existing worksheet (and not have a new workbook create) and then run some VBA macros on it.
View 3 Replies View RelatedDrag & Drop Example.xlsx
In the example attachment on the weekly tab, you will see I have daily totals and a sum for weekly. On the summary tab I have the columns going down with a link to the weekly totals.
I have over 5 years of data in this format and don't want to link each cell in one sheet to another. If I drag and drop, obviously the weekly doesn't come down correctly.
Is there another way as I don't want to have to do this for over 250 weekly totals (and counting) manually.
I've finally gotten the code down to drag an item from one list box and drop it into another listbox, but only for one item at a time. The list boxes are on a user form and I am using Excel 2002.
how to select multiple items in ListBox1, drag them to and drop them into ListBox2?
I have a spreadsheet where I often have to exchange pairs of cells. I currently do this by dragging Cell A to a blank portion of the sheet, dragging Cell B to Cell A's former location, then dragging Cell A to Cell B's former location. I was just thinking that I might be able to use VBA to allow me to drag Cell A to Cell B and have them "trade places".
I don't even know what events are involved in the dragging process so I don't know where to start.
I am looking to if there is anyway to move an image box using a mouse drag and drop action. I have put together a little example of what I am trying to work with and was wondering if anyone on here had any tricks to make this work.
I realise the drag and drop method only applies to the textbox and listbox but have seen some old code that can simulate the drag and drop by creating a border of some sort to illustrate where the image box is going to be placed and final just setting the properties of that image box to where the border is placed.
In the example type in a size in the width and height textboxs (I used 3000,3000) and then what I want to do from there is move the white box using the mouse within the blue box.
I was trying to drag a node onto a worksheet and for that node to remain in the treeview control.
I have found out that if I hold the CTRL key then the node remains on the treeview.
Does anyone know how I can implement this action in my code so I don't have to keep pressing the control key?
I am wondering if it is possible to drag & drop, via left-click, the data in a cell but WITHOUT affecting it's reference -- i.e., like "Copy here as values only".
View 1 Replies View RelatedWhich code is "better" to disable D&D, C&P....
Private Sub Workbook_Activate()
Application.CutCopyMode = False
Application.OnKey "^c", ""
Application.CellDragAndDrop = False
End Sub
Private Sub Workbook_Deactivate()
[Code] .......
OR This one:
Option Explicit
Private Sub Workbook_Activate()
With Application
.CutCopyMode = False
.CellDragAndDrop = False
[Code] ........
I noltice that one uses "Option Explicit" and one doesn't, one seems to be longer than the other, but when I tested both, they both seem to do the same thing. I did notice that neither one of them prevents a "paste" into the worksheet when something is copied from an outside source, but that is not a concern right now!!!
For example. Dragging c7 to e5.
My range before dragging and dropping...
After the drop.
What do you think? I think it can be done but do not want to waste time going about it the wrong way. Please give me any ideas on how you would approach this problem.
Some information to start with. The modal dialog that pops up can be dealt with.
This one.
I can determine if I want to insert down or up. I am not concerned with shifting left or right at this point.
I can also determine the original address and destination address of the drag and drop operation by using the change event.
The ranges being dragged will be limited to a single cell.
I've created a macro to disable cut-copy-paste and drag-and-drop (below), but when the user exits Excel, the drag-and-drop option remains turned off.
The user has to click on the Office button, go to Excel Options, Advanced tab, and re-enable the fill handle manually. How can I have my macro do this automatically when the workbook is closed?
'*** In a standard module ***
Option Explicit
Sub ToggleCutCopyAndPaste(Allow As Boolean)
'Activate/deactivate cut, copy, paste and pastespecial menu items
Call EnableMenuItem(21, Allow) ' cut
Call EnableMenuItem(19, Allow) ' copy
Call EnableMenuItem(22, Allow) ' paste
Call EnableMenuItem(755, Allow) ' pastespecial
'Activate/deactivate drag and drop ability
Application.CellDragAndDrop = Allow
'Activate/deactivate cut, copy, paste and pastespecial shortcut keys
With Application
Select Case Allow
Case Is = False ....................................
I am researching the possibility of using Excel 2003 WITHOUT a Cad or Drawing package to simulate a drawing. (Consultants inquiries are WELCOME). The idea is to prompt the user (Sales Rep or Customer) for a few key dimensions and then plot out a closed curve based on the coordinantes entered. This shape, which would need to be accurately scaled, would then be sectioned and used as a canvas for dragging and dropping various icons.
Why use Excel instead of CAD?
Other than "everyone" having it, the placement of the "icons" relative to the perimeter of the curve will be used to estimate material costs and generate a quotation like a configurator application.
Key hurdles seem to be the drawing of a curve with cells as pixels and using drag & drop with custom icons - possible as an Add-In?
How can I disable the paste function on an Excel worksheet, including drag and drop?
Preferably I still want to retain the ability to copy.
I making a template for multiple users to import data into for analysis. I want them to be able to delete and drag-and-drop data to get rid of any bogus values. However i need forumlas that reference those to NOT follow the values as there as moved. As a simple example say you have two columns, column A is a set of random numbers, column B is the number from coumn A times 2. If take the bottom half of column A and drag it up one cell, overwriting a cell, now the cell in column B next to the overwritten cell has a #REF err and ever cell below that now references a Cell in column A from the previous row. I want a formula that references a static address and will not follow the cell if it is moved.
If I use named ranges rather than specific cells references it works for the above example, however for my actual form it does not. Even though the ranges and formulas stay the same I start getting incorrect values. If there is no other way to this I will try to figure why the named ranges do not work.
I am running Excel 2010 and Windows 7.
I have a form with a main list box and several other list boxes. I drag and drop records from the main list box to the others. When I drop a record onto one of the list boxes, a corresponding worksheet is updated with the same record. This works just fine.
The problem I have is:I close and re-open the form after having added some dataDrag/Drop a record to the list boxThe worksheet won't find the first empty rowExample: If the worksheet already contains 4 rows of data, I have to drag/drop 5 times before the fifth row will be updatedI would like to drop the data the first time and have the first blank row updated
Notes:
1.) I have tried variations of "xlUp", "xlDown", and SpecialCells(xlCellTypeLastCell) in the "Worksheets("Monday")... line of code; all to no avail.
2.) The cells contain formatting (borders)
Here is the relevant code:
Code:
'Copy items from the list box to the worksheet
For intI = 1 To ListBox2.ListCount
For intJ = 1 To ListBox2.ColumnCount
If IsEmpty(Worksheets("Monday").Cells(intI + 1, intJ)) Then
Worksheets("Monday").Cells(intI + 1, intJ).Value = ListBox2.List(intI - 1, intJ - 1)
End If
Next intJ
Next intI
I've got a large selection of lists on drop down menu's the second drop down is based on the selection of the first but when you select the second drop down it starts at the bottom with lots of blanks you have to scroll up to get to the top of the list how do I make this start at the top and ignore the blanks?
I've got the ignore blanks box ticked on the data validation but it doesn't make any difference?
is it possible to restrict a cell in such a way that it is impossible to type data into it, but rather select data from a drop down, through validation?
View 9 Replies View Relatedmy excel sheet runs through a lot of calculations, opens Flowmaster, a simulations program, passes on data, receivs data and so on. Is there any way to have a user input to stop the whole simulation. During the first tries I had a lot of break point in my debugger. But now I want to have a button to hit or better just some keys to hit to stop it without using the ctrl+alt+del which closes everything.
View 4 Replies View Relatedwhat its called when you have drop down menus that correspond with other drop down menus.
View 2 Replies View RelatedHere is what I'm trying to do:
I have 4 sheets:
1 called main
1 called states
1 called counties
1 called people
On "main" I have 1 drop down box and 1 cell:
the drop down lists the states from "states" sheet
the cell, which i would like to have as a drop down is supposed to be listing the counties in the state selected from the 1st drop down. right now it is setting the value to TRUE for testing purposes.
then when the county is selected, it will display the people in that county listed in "people". So far I can only get the 1st drop down to list the states. that's the easy part. i need to getting the counties to list in another drop down based on what state is selected.
Im a fairly basic VBA user who has just purchased the code for J-Walk's Enhanced Data Form.
On other threads in this forum I have noticed a lot of people asking how to make the contents of one drop-down box dependant on the selection in another. I am trying to do the same thing but with the criteria section of the EDF form.
Is this possible? What does give me hope is that a simple Autofilter - whilst not as aesthetically pleasing, does the job well.
Currently I have columns fixed or assigned to the names of insurance providers/companies.
In each column below the name of the Insurance Company, a combobox containing the plans that company offers. Choose a plan, and the rest of the column is filled in using vlookup.
Now to save space, IE opposed to having 13-15 columns one assigned to each Insurance Company/Provider. I am looking to have only 3-5 columns with a first initial combobox in which one chooses the Name of the Company/Provider, and in turn populate the original combobox and vlookup functionality I already have built in.
Here is an example of what I am working with.
[url]
On the 'Total' sheet I'm wanting subsequent sheets to fill in on the rows. Do I have to redo the formulas for each row because it will correlate to a different sheet? I only know how to drag the formula down, but that doesn't seem to work right!
View 11 Replies View RelatedI have a perfect formula
=IF(A2>1,A2/1.16,"")
It does exactly what I need , it does not calculate on empty rows , but it calculates on heading rows , how can I modify to avoid this.
See file attached , I don't want the value on b6 when I drag downwards.
07 09 value avoiding.xls
I have a workbook with five different sheets in it.The first is an inputs sheet where I populate inputs to my file. The rest all contain formulas in a top row (ex: A2:G2 in the first sheet D4:M4 in the second sheet...etc). These formulas are calculating values based off my input sheet and need to be dragged down the same number of rows as is in the inputs sheet (if there are 125 rows in my input sheet I need it to drag down the formulas 125 times, so from A2:G2 to A126:G126 or D4:M4 to D129.
The main problem is that I never know how many rows will be on the input sheet so the piece of code would ideally count and then apply that count to all of the other tabs and drag down the appropriate amount of rows. It is a base file so I save a copy each time I open so the start rows will always be the same.
I need to disable cut and drag only in a workbook. The idea is to avoid formula reference errors when unlocked cells are cut and pasted or dragged. I can find many macros online but none that do only these two things.
View 2 Replies View RelatedI have a formula that I would like the column references to change as I drag the formula down. I would also like the row reference to stay the same.
I have attached my workbook for reference. I listed the value in red I would like to achieve
Book1.xlsx
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A1:C2)
If I simply drag the above formula down I end up with
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A2:C3)
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A3:C4)
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A4:C5)
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A5:C6)
I am trying to drag the above formula so that it copies in the following manner:
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A3:C4)
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A5:C6)
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A7:C8)
=DCOUNT(timeg15w!$A$1:$F$3909, "WPC",Criteria!A9:C10)
How can I achieve this result?
i need a macro that will simulate the little corner crosshair that you drag to fill in and increment formulas. i need to fill down on sheet 2, columns a thru m a number of rows equal to sheet 1,column b, count -1.
View 9 Replies View Related