Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
In a particular worksheet I have a number of named ranges. In cell "AM2" I have entered the name of a particular named range. I'm trying to put together a piece of code that will look at the named range value entered in "AM2", select that particular range, deleting it and then shifting the cells beneath it up. This is what I have at the moment, but it's not working for me (I get a Run_time error '1004' Method 'Range' of object '_Global' failed error message). Sub test() Dim strQueryName As String strQueryName = ActiveSheet.Range("AM2") Range(strQueryName).Select Selection.Delete Shift:=xlUp End Sub Hope someone can help - Regards, Grant |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting or changing a range name | Excel Discussion (Misc queries) | |||
Deleting Range name's listed in the range address box. | Excel Discussion (Misc queries) | |||
Deleting range names | Excel Programming | |||
Rename a Range, programatically? | Excel Programming | |||
Deleting range not a row | Excel Programming |