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.
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.
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.
Private Sub Workbook_Activate() Application.CutCopyMode = False Application.OnKey "^c", "" Application.CellDragAndDrop = False End Sub Private Sub Workbook_Deactivate()
OR This one:
Option Explicit Private Sub Workbook_Activate() With Application .CutCopyMode = False .CellDragAndDrop = False
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!!!
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?
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 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
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:
'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 am rotating an image on a userform by uploading different gif images to simulate the rotation. There is an annoying screen flicker around the image when changing images that I would like to get rid of if possible. how to get rid of the flicker or a different technique I could use to rotate an image? 1st attempt - uploading different pictures
For h = 1 To Sheets("Bar Contents"). Range("B" & ItemRow) Step 1 PictureLocation = ThisWorkbook.Path & "PicturesTransparent" & Sheets("Bar Contents").Range("C" & ItemRow) _ & " " & h & ".gif" GameUserForm.DrinkAnimation.Picture = LoadPicture(PictureLocation) Sleep 50 DoEvents Next h.........................
I want to insert image on my userform, but I have problems with It. Image is originally .png and has no background, which is what I need.
Excel doesn't allow me to use .png, so I had to convert It to .jpg, but then background is included. Even that would be o.k., If I could somehow change picture background to "&H8000000F&" system colour, but failed to do that also.
So I tried with converting file to .ico, and again Excel recognizes It as invalid picture.
I just want to insert image, and leave background same colour as Userform.
in a userform in Excel. As you might have guessed, I've created a macro that, depending on user inputs, can take a bit of time to run, and I want to display something to let the user know that Excel hasn't locked up. Ideally, this would be a sort of faux status bar like the one above that implies that there is work being done without necessarily actually indicating the amount of work completed (I figure that would be easier to code).
Do you have any recommendations about how to accomplish something like this? Ideally also I'd like to not have to download anything in order to make this work, as the spreadsheet is designed for others to use, so it would be inconvenient if they had to install an add-in or similar to get it to run.
I currently have a VB macro written where under certain conditions user forms are shown for the user to select options, display messages, etc. When any of these forms are on the screen, and someone drags them, the menu image is 'dragged' across the screen. Is there a way from preventing this from happening?
Upon click of "Populate Scorecard" button (e.g. on Company X worksheet), would like user to complete the Userform and based on their response, it would add to the appropriate "Month" (selected from the Userform Drop down) in the Scorecard worksheet.
I have started an IF statement for "Jan-08" and was going to copy and paste code for each of the months, e.g "Feb 08, Mar-08 etc", but thought their would be an easier way based on Loops or Call statement. Just not sure how to do this? Can anyone assist with getting me started?
I'm also not sure how to add the code for "Buyer Comments" and "Month" to be added to seperate worksheet (e.g. Company X), if Company X was selected.
Note that i will create a hide sheet statement, so user can select which Company (e.g. X or Y) to select from. The code would then need to correspond with that companies Scorcard worksheet.