Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Programming
Paste and display issue
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Doug Glancy, post: 13492313"] Patrick, I know you say your code does exactly what you want, but it contains unused variables, undeclared variables, and doesn't turn ScreenUpdating back on. Further, if you have an error you won't turn EnableEvents back on either. I think what you are doing is pasting data at the next empty cell in column B. To do this and to eliminate some of the issues above, I took the liberty of rewriting your code. It also puts the last first pasted cell in the upper left area of the screen Sub Paste_Data() Dim lngLastRow As Long On Error GoTo Error_handler Application.ScreenUpdating = False Application.EnableEvents = False lngLastRow = Range("B" & Rows.Count).End(xlUp).Row Range("B" & lngLastRow + 1).PasteSpecial Paste:=xlPasteValues Application.Goto reference:=Range("A" & lngLastRow), scroll:=True Error_handler: Application.ScreenUpdating = True Application.EnableEvents = True End Sub __________ Information from ESET NOD32 Antivirus, version of virus signature database 4380 (20090829) __________ The message was checked by ESET NOD32 Antivirus. [URL]http://www.eset.com[/URL] [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Programming
Paste and display issue
Top