+ Reply to Thread
Results 1 to 9 of 9

Paste disabled

  1. #1
    Registered User
    Join Date
    10-31-2007
    Posts
    6

    Paste disabled

    Hi Folks

    I've got a problem that i've been unable to solve.
    I've got Data Validation used on one of my columns.
    The list of values come from a named range on another sheet.
    The problem is if you select a value from the dropdown, you can't paste that value into other cells below it. The paste choice is grayed out!
    Any help is appreciated!

    Thanks in Advance!

  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,259
    Hello lushl0sn,

    Welcome to the Forum. It would be easier and faster to find the cause of your problem if you would zip your workbook, and attach it to your next post.

    Thanks,
    Leith Ross

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Sounds like the worksheet is protected.

  4. #4
    Registered User
    Join Date
    10-31-2007
    Posts
    6
    I have narrowed it down to the following bit of code!

    Please Login or Register  to view this content.


    If (cell.EntireRow.Interior.ColorIndex = 6) and ('cell.EntireRow.Interior.ColorIndex = xlNone) are removed, then Paste works!

    Can anyone tell me what is going on and how to fix it?

    Here iis an example
    sample4.zip
    Last edited by VBA Noob; 11-09-2007 at 12:54 PM.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You forgot to tell us there was code in the workbook?

  6. #6
    Registered User
    Join Date
    10-31-2007
    Posts
    6
    Quote Originally Posted by shg
    You forgot to tell us there was code in the workbook?
    Sorry about that!

    It's in the Distimport sheet!

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

    I downloaded your workbook to see what the problem was. I changed your macro some , and moved it into the Worksheet_Change(ByVal Target As Range) event procedure. Everything works. Paste will be grayed out whenever the clipboard is empty. Here is the macro I used. I am running Office 2003 on Windows XP.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  8. #8
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Couldn't those event routines be substituted by Conditional Formatting? Or is there some other routine that checks for cell color?

  9. #9
    Registered User
    Join Date
    10-31-2007
    Posts
    6
    Thanks so much for the help Leith and mikerickson!
    I've got a lot to learn about Excel Programming so my technique might not be the best!
    Conditional formatting may be a better option.
    Can anyone tell me why paste is disabled in the SelectionChange event and not the change event after the following code is executed?

    Please Login or Register  to view this content.
    Last edited by VBA Noob; 11-11-2007 at 11:06 AM.

+ 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