+ Reply to Thread
Results 1 to 3 of 3

Paste 1st & 2nd columns with DependantlistBoxes

  1. #1
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Paste 1st & 2nd columns with DependantlistBoxes

    I would to say thank you to RoyUK for helping me out with this DependantlistBoxes where a Userform has two columns.

    Now I've manupilated a Userform so that whenever I double click on the cell, the selected text from the second box in Userform is pasted to the cell in the next column to the right.

    But I what I really want it to do is to past the text fromt the first box in Userform to the active cell and when move to the second box in Userform, the selected text will be paste to the cell on the right.

    Like I double click on B3 (in "Fullarton") sheet, a userform appear. When I choose CB from the first box in userform, it should paste in B3.
    Then when I choose Electrician from second box in userform, Electrician should be paste in C3.

    I have enclosed the file for you to see and hope there is a way to it
    Thank you in advance

    DependantlistBoxesShort.xls
    Last edited by unley; 05-04-2009 at 06:00 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Paste 1st & 2nd columns with DependantlistBoxes

    Hello unley,

    I changed two of the UserForm event procedures to paste the information into the ActiveCell and into the cell to the right of the ActiveCell. The changes shown have been added to the attached workbook.

    When writing code for UserForm procedures, it is redundant to prefix a Control with the keyword Me and usually unnecessary. Since the code is being written for the UserForm module, VBA assumes the Control references belong to this module. This is equivalent to adding the UserForm name to the Control name.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Re: Paste 1st & 2nd columns with DependantlistBoxes

    thank you very much Leith Ross for your time with this.

    Like I said before, I got so much to learn VBA with excel and now I have to work out UserForm with 3 columns.

    So thank you again Leith, much appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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