acsmiamiguy
New Member
- Joined
- Jan 1, 2018
- Messages
- 8
Can't understand why this doesn't work...
Range(ActiveCell, ActiveCell.Offset.End(xlDown).Offset.End(xlToRight)).Select
PartID = Range(ActiveCell, ActiveCell).Offset(0, -2).Value
MsgBox (PartID)
Selection.Name = PartID
I selected a range of cells; set 'PartID' to pick up the value two cells to the left of the active cell; then tested it using a MsgBox, and it works. The MsgBox reads '100', which is the value I need to name the range. But when I use the Selection.Name = PartID I get an error. What am I missing here?
Thank you.
Range(ActiveCell, ActiveCell.Offset.End(xlDown).Offset.End(xlToRight)).Select
PartID = Range(ActiveCell, ActiveCell).Offset(0, -2).Value
MsgBox (PartID)
Selection.Name = PartID
I selected a range of cells; set 'PartID' to pick up the value two cells to the left of the active cell; then tested it using a MsgBox, and it works. The MsgBox reads '100', which is the value I need to name the range. But when I use the Selection.Name = PartID I get an error. What am I missing here?
Thank you.