Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Private Sub cmdHRSLoading_Click()
  2. Dim NameRange As String
  3. If chkANW = True Then
  4. NameRange = Me.txtHRS_ANW.Value 'gives me following string HRS_ANW_CORP01 (until CORP10 depending on user entry)
  5. Sheet5.Range(NameRange).Select 'here I would like to use the string as a reference for the range
  6. Selection.Copy
  7. Sheet9.Range("A" & Rows.count).End(xlUp).Offset(1).Select
  8. Selection.Paste
  9. End If
  10.  
  11. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement