A
Arturo
Hello,
I’m wondering if there’s away to add a named range to a specified sheet
without selecting that sheet first. I can get a row count from a sheet while
it’s not active…
Public MASTERwb As Workbook
Sub ScaleVLU()
Dim RowCnt As Integer
Set MASTERwb = ActiveWorkbook
MASTERwb.Sheets(“abcâ€).Select
RowCnt = MASTERwb.Sheets(“abcâ€).UsedRange.Rows.Count
MASTERwb.Names.Add Name:="VLU", _
RefersTo:="=" & MASTERwb.Sheets(“abcâ€).Range("A1" & RowCnt).Address
End Sub
Appreciatively,
Arturo
I’m wondering if there’s away to add a named range to a specified sheet
without selecting that sheet first. I can get a row count from a sheet while
it’s not active…
Public MASTERwb As Workbook
Sub ScaleVLU()
Dim RowCnt As Integer
Set MASTERwb = ActiveWorkbook
MASTERwb.Sheets(“abcâ€).Select
RowCnt = MASTERwb.Sheets(“abcâ€).UsedRange.Rows.Count
MASTERwb.Names.Add Name:="VLU", _
RefersTo:="=" & MASTERwb.Sheets(“abcâ€).Range("A1" & RowCnt).Address
End Sub
Appreciatively,
Arturo