Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to delete the named range that is created while updating my web query.
Can someone help with the delete code, below is what I've tried and it doesn't delete. The first arrow is what the range is named, the second is to delete the named range although it doesn't work. Sub Macro14() With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://finance.yahoo.com/q/ks?s=" & Range("B3").Value, Destination:=Range("J5")) ---- .Name = "Macro" & Range("B3").Value .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlOverwriteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "42,45,48" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With ---- ActiveWorkbook.Names("Macro" & Range("B3").Value).Delete End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Delete blanks between a range and populate only the names inthe given range | Excel Discussion (Misc queries) | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
Range.Delete and Range.Resize.Name performance issues | Excel Programming | |||
delete name range | Excel Programming | |||
DELETE RANGE NAME | Excel Programming |