![]() |
|
|
|
#1
|
||||
|
||||
|
FWIW, I'd write your code more like this:
Code:
Sub button_click1()
Dim lRow As Long
lRow = ActiveCell.Row
If ActiveSheet Is Sheets("Clipsal Customer") Then
If Not Intersect(ActiveCell, Sheets("Clipsal Customer").Range("A4:Z5000")) Is Nothing Then
With Sheets("Payment Advice")
.Range("B3") = Date
.Range("B4") = Cells(lRow, "a").Value
.Range("B5") = Cells(lRow, "g").Value
.Range("B6") = Cells(lRow, "h").Value
.Range("B7") = Cells(lRow, "i").Value
.Range("B8") = Cells(lRow, "j").Value
.Range("B9") = Cells(lRow, "k").Value
.Select
End With
End If
End If
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EXCEL 2016 - merging multiple selected cells | kevin.suh | Excel | 2 | 03-28-2017 07:01 AM |
Word - Resize image to specified selected cells' dimensions
|
FaizanRoshan | Word VBA | 7 | 10-18-2015 03:34 PM |
Code that will run when a cells value is changed.
|
DonJohns1 | Excel Programming | 2 | 04-15-2015 10:48 AM |
Auto repeat selected cells from tables into a summary
|
AdieReeves | Word Tables | 7 | 10-22-2014 07:59 AM |
| How to keep orientation when printing Selected Cells | punkrae | Excel | 1 | 04-09-2012 05:32 PM |