Hey Excel Folks,
I'm having trouble with this one and I need some help.
My Objective: copy data from one excel sheet (rgSource) to a different destination sheet (rgDestination).
Problem: I can't get the Active cell selection to work and then have VBA automatically select the entire row.
Here's my code thus far:
Private Sub CommandButton4_Click()
'''' Move to Archive Button ''''
Dim rgSource As Range, rgDestination As Range
Set rgSource = ThisWorkbook.Worksheets("Database2").Range(Activecell.EntireRow) ''''Problem''''
Set rgDestination = ThisWorkbook.Worksheets("Archive").Range("A" & Application.Rows.Count).End(xlUp)
rgSource.Copy
rgDestination.PasteSpecial xlPasteValues
End Sub..
Thank you so much!
Sincerely,
kp
I'm having trouble with this one and I need some help.
My Objective: copy data from one excel sheet (rgSource) to a different destination sheet (rgDestination).
Problem: I can't get the Active cell selection to work and then have VBA automatically select the entire row.
Here's my code thus far:
Private Sub CommandButton4_Click()
'''' Move to Archive Button ''''
Dim rgSource As Range, rgDestination As Range
Set rgSource = ThisWorkbook.Worksheets("Database2").Range(Activecell.EntireRow) ''''Problem''''
Set rgDestination = ThisWorkbook.Worksheets("Archive").Range("A" & Application.Rows.Count).End(xlUp)
rgSource.Copy
rgDestination.PasteSpecial xlPasteValues
End Sub..
Thank you so much!
Sincerely,
kp