H
Howard
I wrote this code and it works fine, EXCEPT now I see that I need to assignthe SName to the range I copied to the Sessions sheet AFTER it has been copied to the new sheet. The way I have it now is the name refers to the range on the Title Generator sheet and I need it to refer to the 'just copied' range the in Sessions sheet.
I will copy the same range several times from Title Generator to Sessions, each time with different data and a different name.
Later I will have a need to recall those Session named ranges back to TitleGenerator, so I will need to refer to the names in Sessions.
I'm unsure how to name the range after it has been copied...?
Sub ToSessionsSheet()
Dim SName As String
SName = InputBox("Enter a name for this Session", "Session Namer")
If SName = vbNullString Then Exit Sub
'Adds session names to the drop down list used for cell A9 drop down
Range("AD30").End(xlUp).Offset(1, 0) = SName
'Assigns the session name to the range B11:T513
ActiveWorkbook.Names.Add Name:=SName, _
RefersTo:=Sheets("Title Generator").Range("$B$11").Resize(503, 19)
'copies to sheet Sessions
Range("$B$11").Resize(503, 19).Copy
Worksheets("Sessions").Range("B10000").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
SName = vbNullString
End Sub
Thanks,
Howard
I will copy the same range several times from Title Generator to Sessions, each time with different data and a different name.
Later I will have a need to recall those Session named ranges back to TitleGenerator, so I will need to refer to the names in Sessions.
I'm unsure how to name the range after it has been copied...?
Sub ToSessionsSheet()
Dim SName As String
SName = InputBox("Enter a name for this Session", "Session Namer")
If SName = vbNullString Then Exit Sub
'Adds session names to the drop down list used for cell A9 drop down
Range("AD30").End(xlUp).Offset(1, 0) = SName
'Assigns the session name to the range B11:T513
ActiveWorkbook.Names.Add Name:=SName, _
RefersTo:=Sheets("Title Generator").Range("$B$11").Resize(503, 19)
'copies to sheet Sessions
Range("$B$11").Resize(503, 19).Copy
Worksheets("Sessions").Range("B10000").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
SName = vbNullString
End Sub
Thanks,
Howard