This appears to be a seemingly simple problem, but I cannot figure it out. Relative newbie to VBA, so any help would be appreciated.
I have a form that copies data to a worksheet. Works fine. I would like to take the last row in that dynamic worksheet and copy to yet another worksheet, copying to a specific location (cell A250).. Everything works except that I cannot get the last row to copy to the destination worksheet. The error is clearly in the last line of code, as follows:
Can anyone troubleshoot this one?![]()
Private Sub CopyFormData() Dim Last_Row1 As Long Dim ws1 As Worksheet, ws2 As Worksheet Set ws1 = Sheets("Info Data") Set ws2 = Sheets("Active X Controls") ' Determine the lastrow of the data to copy Last_Row1 = ws1.Range("A" & Rows.Count).End(xlUp).Row 'Copies last row to Active X Controls, Row 250 ws1.Range("A" & Last_Row1).Copy ws2.Range("A250") End Sub
Bookmarks