+ Reply to Thread
Results 1 to 3 of 3

Dynamic Drag and Drop Image (on Userform)

  1. #1
    Registered User
    Join Date
    09-04-2014
    Location
    WA, USA
    MS-Off Ver
    2007
    Posts
    69

    Dynamic Drag and Drop Image (on Userform)

    I'm using the code below to enable drag and drop for an image. It works great. I'm hoping to find a way to make this code dynamic so that I do not have to recreate the code every time that I have a new image. I have worked a little with dynamic code before (and understand most/some of it), but am having trouble with making this one dynamic. I can post my attempt (the class codes I've tried to combine with this) if it helps.

    Any help or thoughts would be appreciated greatly! Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,435

    Re: Dynamic Drag and Drop Image (on Userform)

    You need to use a class object to handle multiple controls without having to write lots of duplicate event code.

    See attached.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-04-2014
    Location
    WA, USA
    MS-Off Ver
    2007
    Posts
    69

    Re: Dynamic Drag and Drop Image (on Userform)

    Thank you Andy. I'm yet to earn my wings with Class Modules. I'm getting the hang of it somewhat though. I broke the rules and started another thread (I think it was partly on accident after sleeplessly trying to solve this problem). I solved the problem using another code -- which I will attach here.

    I'm confident that I will glean something from your code as well. It appears to use the term 'collection' which is a code I need to learn about (I'm just starting to use arrays and trying to learn about both).

    Thank you so much for taking the time to post this! Coding is so fun -- I'm having a blast.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-14-2016, 04:59 AM
  2. [SOLVED] Dynamic ComboBox (Drop down) menu in a VBA UserForm
    By igormigor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-17-2015, 05:07 AM
  3. [SOLVED] Using a Userform to Browse image file then paste selected image to sheet?
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-05-2015, 05:42 PM
  4. [SOLVED] How to apply Image borders to an image that my excel vba userform pastes in a word doc?
    By CaptainCool in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-11-2014, 05:40 PM
  5. [SOLVED] VBA to transfer image FROM userform image control TO a worksheet cell
    By Zoediak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 02:51 PM
  6. How to Drag and Drop picture in userform VB
    By onlinecom in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2011, 05:12 PM
  7. [SOLVED] Drag&Drop over an UserForm
    By myname in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2005, 03:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1