M
Mike Fogleman
As I loop thru Hyperlinks, I need a reference to the active Hyperlink so I
can put a value in a cell Offset(0,7). See the first line following the
query
Option Explicit
Sub UpdateUsage()
Dim hyp As Hyperlink
Dim hypadr As String
For Each hyp In ActiveSheet.Range("K:K").Hyperlinks
hypadr = hyp.Address
With Worksheets("Update").QueryTables.Add(Connection:="URL;" & hypadr _
, Destination:=Range("A1"))
.name = ""
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
ActiveSheet.CurrentHyperlink.Offset(0, 7).Value = _
Worksheets("Update").Range("C7").Value ==>this is not right
With Worksheets("Update")
'do some other stuff
.Rows("1:7").Delete shift:=xlUp
End With
Next hyp
End Sub
Mike F
can put a value in a cell Offset(0,7). See the first line following the
query
Option Explicit
Sub UpdateUsage()
Dim hyp As Hyperlink
Dim hypadr As String
For Each hyp In ActiveSheet.Range("K:K").Hyperlinks
hypadr = hyp.Address
With Worksheets("Update").QueryTables.Add(Connection:="URL;" & hypadr _
, Destination:=Range("A1"))
.name = ""
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
ActiveSheet.CurrentHyperlink.Offset(0, 7).Value = _
Worksheets("Update").Range("C7").Value ==>this is not right
With Worksheets("Update")
'do some other stuff
.Rows("1:7").Delete shift:=xlUp
End With
Next hyp
End Sub
Mike F