reddcannon
Board Regular
- Joined
- Aug 11, 2011
- Messages
- 110
excel 16, windows 10, desktop
I have this macro to take date from one page and put on another, it is going from tab "Pricesheet" to tab "quote" I want it to start on line 16 of tab "quote" but it keeps going to line 1. What am I doing wrong. here is what I have
Private Sub CommandButton2_Click()
Dim r As Long, s As Long
Application.ScreenUpdating = False
With Sheets("Pricesheet")
.Unprotect Password:="123"
Application.GoTo Range("a8"), True
s = Sheets("quote").Range("a" & Rows.Count).End(xlUp).Offset(1).Row
For r = 16 To 40
If .Range("a" & r) > "" Then
Sheets("quote").Range("a" & s).Resize(, 2).Value = _
.Range("a" & r).Resize(, 7).Value
s = s + 1
End If
Next
.Protect Password:="123"
End With
Application.ScreenUpdating = True
Sheets("quote").Select
End Sub
thanks in advance. I am not a genius so please don't beat me up
I have this macro to take date from one page and put on another, it is going from tab "Pricesheet" to tab "quote" I want it to start on line 16 of tab "quote" but it keeps going to line 1. What am I doing wrong. here is what I have
Private Sub CommandButton2_Click()
Dim r As Long, s As Long
Application.ScreenUpdating = False
With Sheets("Pricesheet")
.Unprotect Password:="123"
Application.GoTo Range("a8"), True
s = Sheets("quote").Range("a" & Rows.Count).End(xlUp).Offset(1).Row
For r = 16 To 40
If .Range("a" & r) > "" Then
Sheets("quote").Range("a" & s).Resize(, 2).Value = _
.Range("a" & r).Resize(, 7).Value
s = s + 1
End If
Next
.Protect Password:="123"
End With
Application.ScreenUpdating = True
Sheets("quote").Select
End Sub
thanks in advance. I am not a genius so please don't beat me up