Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Add code to paste data to next available row

rw was set to to so I originally used rw and then took out all the lines with
rw except this one

from
LastRow = sh.cells(rows.count,rw).end(xlup).row
to
LastRow = sh.cells(rows.count,"B").end(xlup).row


"J.W. Aldridge" wrote:

Thanx....


But getting

Application defined error or object defined error

on this line

LastRow = sh.Cells(Rows.Count, rw).End(xlUp).Row


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Add code to paste data to next available row

worked purfectly!


Thanx...

When I become a millionaire, I'm buying you a Krystal! With Cheese!
(Or a White Castle).
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Add code to paste data to next available row


Keep getting error with this part.....


Range(cell, Cells(cell.Row, "g)).Copy sh.Cells(NewRow, 1)
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Add code to paste data to next available row

You change the B to a G and lost a double quote.

from
Range(cell, Cells(cell.Row, "g)).Copy sh.Cells(NewRow, 1)
to
Range(cell, Cells(cell.Row, "g")).Copy sh.Cells(NewRow, 1)

PS: I've been eating white castle for 50 years. I can eat a lot of those
small burgers.


"J.W. Aldridge" wrote:


Keep getting error with this part.....


Range(cell, Cells(cell.Row, "g)).Copy sh.Cells(NewRow, 1)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to copy and paste those cells that have data Mayte Excel Programming 0 January 6th 09 09:57 PM
Code to copy and paste those cells that have data lostandcondfused Excel Programming 0 January 6th 09 09:53 PM
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM
Got the Copy/Cut Code But what is the Paste Code Corey Excel Programming 7 July 7th 06 02:23 PM
VBA code gets lost from workbook if I paste in new data and save??? Lonnie[_3_] Excel Programming 1 April 8th 04 05:49 PM


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"