inseting a set of strings

jamtay317

Well-known Member
Joined
Mar 6, 2013
Messages
769
I'm tring to insert a set of strings, and for some reason its not going to the next open row, its just inserting them over the last record. Can someone please look at the code and tell me where I'm wrong?

Code:
Private Sub Insert_Payment_Click()Dim Payment As String, PaymentAddress As String


    Worksheets("Payments").Select
        Payment = Range("E4")
        PaymentAddress = Range("B4")
        
    Worksheets("RentalDates").Select
    Worksheets("RentalDates").Range("I1").Select
    If Worksheets("RentalDates").Range("I1").Offset("1,0") <> "" Then
    Worksheets("RentalDates").Range("I1").End(xlDown).Select
    End If
    ActiveCell.Offset(1, 0).Select
    ActiveCell = Payment
    ActiveCell.Offset(0, -2).Select
    ActiveCell = PaymentAddress
    ActiveCell.Offset(0, 1).Select
    ActiveCell = Date
    Worksheets("Payments").Select
    Range("B4").Select
    ActiveCell.ClearContents
    ActiveCell.Offset(0, 3).Select
    ActiveCell.ClearContents
    
    
End Sub
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,214,985
Messages
6,122,603
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top