+ Reply to Thread
Results 1 to 2 of 2

WorkSheet Macro Help!

  1. #1
    Registered User
    Join Date
    01-18-2005
    Posts
    62

    WorkSheet Macro Help!

    Dear all,

    I am trying to create a macro in Excel that when user select a cell a listbox will appear. However, when I copy a cell to paste to another cell, first this below macro run so that I could not paste the value that I copied. It means that if I want to use this macro in this worksheet I couldn't copy one cell to another cell.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Listbox1.visible=true
    End Sub

    I would like to have a code that when I copy a cell this macro will work until I finish to paste to another cell.

    Could any one can help me!

    Thanks a lot!

    Nam

  2. #2
    Rowan
    Guest

    RE: WorkSheet Macro Help!

    You could try

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If application.cutcopymode = false then Listbox1.visible=true
    End Sub

    Hope this helps
    Rowan

    "lehainam" wrote:

    >
    > Dear all,
    >
    > I am trying to create a macro in Excel that when user select a cell a
    > listbox will appear. However, when I copy a cell to paste to another
    > cell, first this below macro run so that I could not paste the value
    > that I copied. It means that if I want to use this macro in this
    > worksheet I couldn't copy one cell to another cell.
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Listbox1.visible=true
    > End Sub
    >
    > I would like to have a code that when I copy a cell this macro will
    > work until I finish to paste to another cell.
    >
    > Could any one can help me!
    >
    > Thanks a lot!
    >
    > Nam
    >
    >
    > --
    > lehainam
    > ------------------------------------------------------------------------
    > lehainam's Profile: http://www.excelforum.com/member.php...o&userid=18615
    > View this thread: http://www.excelforum.com/showthread...hreadid=377616
    >
    >


+ 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