Has anyone heard of this in many of my Macros I turn off EnableEvents then trun them back on. I just found out that because of this I cannot cut and paste unless I turn it off. I thought it was turned on by default.
Has anyone heard of this in many of my Macros I turn off EnableEvents then trun them back on. I just found out that because of this I cannot cut and paste unless I turn it off. I thought it was turned on by default.
Hello Turtleman10,
The only time you should turn off Events is when you are writing code for event procedures that may trigger themselves by changing a worksheet value like the Worksheet_Change or Worksheet_SelectionChange events. If you do not turn of events and modify a cell or select another cell, you could trigger an infinite loop.
Copy and Paste operations done in VBA are not tied to Worksheets events. It would not matter if events were enabled or not.
To better understand your problem it would help if attach your workbook.
To Post Your Workbook
- At the bottom right of the Reply window, Click the button Go Advanced
- At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
- Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
- Click the Select Files button at the bottom middle of the dialog.
- In the new window Find the file you want to upload, select it, and Click Open.
- You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
- Wait until the file has completely uploaded before you exit the File Manager dialog.
File Manger Pic
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!)
I just figured out what the issue is I was tuning off events on a selectionchange event so I would select my cell copy then select the cell I was copying into when I did the second selection it would turn off events and cancle my copy.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks