- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-1-4 08:57 ½s¿è
¦^´_ 18# blue2263 - Option Explicit
- Sub Ex()
- Dim Rng(1 To 2) As Range
- On Error Resume Next '°õ¦æµ{¦¡½X¦p¦³¿ù»~Ä~Äò°õ¦æ¤U¤@Óµ{¦¡½X: ªÑ²¼Web¦³¿ù»~®É
- With Sheets("¥¨¶°¤u§@ªí")
- Set Rng(1) = .Range("B2")
- .Activate
- End With
- 'Sheets("¶×Á`").UsedRange.Offset(1).Clear '¥Î¦¹µ{¦¡½X" ¦p»Ý²M°£Â¦³¸ê®Æ
- Do While Rng(1) <> ""
- Rng(1).Activate
- With Sheets("ì©lªí")
- .Range("B2") = Rng(1)
- .Range("E7").QueryTable.Refresh BackgroundQuery:=False
- Set Rng(2) = .Range("A10:K29") '§Anªºì©l¸ê®Æ
- End With
- If Err = 0 Then
- Application.StatusBar = Rng(1) & " ¶×¤J¤¤"
- With Sheets("¶×Á`").Range("A1").End(xlDown).Offset(1)
- .Range("A1:K20").Value = Sheets("¶×Á`").Range("A2:K21").Value
- Rng(1).Parent.Hyperlinks.Add Anchor:=Rng(1).Offset(, 2), Address:="", SubAddress:=.Address(, , , 1), TextToDisplay:=.Parent.Name & "!" & .Address(0, 0)
- '«·s³]©w¶W³sµ²
- End With
-
- '************'¥Î¦¹µ{¦¡½X:°t¦X»Ý²M°£Â¦³¸ê®Æ ******************************
- 'With Sheets("¶×Á`").Range("A" & Sheets("¶×Á`").Rows.Count).End(xlUp).Offset(1)
- ' .Resize(Rng(2).Rows.Count, Rng(2).Columns.Count) = Rng(2).Value
- ' Rng(1).Parent.Hyperlinks.Add Anchor:=Rng(1).Offset(, 2), Address:="", SubAddress:=.Address(, , , 1), TextToDisplay:=.Parent.Name & "!" & .Address(0, 0)
- 'End With
- '********************************************
-
- Else
- With Rng(1).Offset(, 2)
- .Hyperlinks.Delete 'ªÑ²¼Web¿ù»~:§R°£¶W³sµ²
- .Value = ""
- End With
- Err.Clear
- End If
- Set Rng(1) = Rng(1).Offset(1)
- Loop
- Application.StatusBar = " ¤u§@ §¹¦¨ !!"
- End Sub
½Æ»s¥N½X |
|