Sub test()
Dim xF As Range, Shp As Shape, T$
[F:G].Clear
Set Shp = ActiveSheet.Shapes(Application.Caller)
T = Replace(Shp.TextFrame.Characters.Text, Chr(10), "")
Set xF = [工作表2!1:1].Find(T, Lookat:=xlWhole)
If xF Is Nothing Then MsgBox "找不到〔" & T & "〕櫃位資料!": Exit Sub
Range(xF, xF(65000, 1).End(xlUp)(1, 2)).Copy [F1]
End Sub
Sub test()
Dim xF As Range, Shp As Shape, T$
[F:G].Clear
Set Shp = ActiveSheet.Shapes(Application.Caller)
T = Replace(Shp.TextFrame.Characters.Text, Chr(10), "")
Set xF = [工作表2!1:1].Find(T, Lookat:=xlWhole)
If xF Is Nothing Then MsgBox "找不到〔" & T & "〕櫃位資料!": Exit Sub
Range(xF, xF(65000, 1).End(xlUp)(1, 2)).Copy [F1]
End Sub作者: 准提部林 時間: 2016-8-23 19:21