ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Ãö©ó¦Û°Ê¶K¤W³sµ²¦Ü¥t¤@­ÓÀɮרæ۰ʴ¡¤J¶W³sµ²

[µo°Ý] Ãö©ó¦Û°Ê¶K¤W³sµ²¦Ü¥t¤@­ÓÀɮרæ۰ʴ¡¤J¶W³sµ²

¥»©«³Ì«á¥Ñ starry1314 ©ó 2015-5-5 17:02 ½s¿è

½Ð°Ý¹³¥H¤U«ü¥O¦p¦ó±N
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
        "..\..\·~°È\·~°È©ú²Ó.xlsm"   ³o¦êªºaddress¼g¦¨

ºÃ°ÝQ1:§Ú¦bQ3Àx¦s®æ¨Ï¥Î CELL(filrname)¥s¥X¨ÓªºÀɮצWºÙ¸ô®|©O?  ­ì¥»¦a§}¬O³]©w¦nªº ·QÅý¥LÀHµÛÀɮתºÅܰʤ]¸òµÛÅÜ°Ê
        Q2:¦p¦ó¦b³o¨Ç«ü¥O´¡¤J EndRow = ActiveSheet.UsedRange.Rows.Count + 1 '©Ò¦³¨Ï¥Î¤¤ªº¦C¼Æ+1 ³o±ø«ü¥O©O

·QÅý¥L¦b©Ò¦³¨Ï¥Î¤¤¦C¼Æ+1¨Ã¥B¥i´¡¤J¶W³sµ²

½d¨Ò-¦Û°Ê´¡¤J¶W³sµ².rar (277.7 KB)
  1. Sub ¶K¤W¸ê®Æ¦Ü_·~°ÈºÞ²z()
  2. '
  3. ' ¶K¤W¸ê®Æ¦Ü_·~°ÈºÞ²z ¥¨¶°
  4. '
  5.     Range("A3:P3").Select
  6.     Selection.Copy
  7.     Windows("«È¤á©ú²Ó-·~°È±M¥Î.xlsm").Activate
  8.     Range("B7").Select
  9.     ActiveSheet.Paste Link:=True
  10.     Windows("«È¤á©ú²Ó-·~°È±M¥Î.xlsm").Activate
  11.     ActiveSheet.Paste Link:=True
  12.     Application.CutCopyMode = False
  13.     ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
  14.         "..\..\·~°È\·~°È©ú²Ó.xlsm"

  15. End Sub
½Æ»s¥N½X

¦^´_ 65# lpk187


   
·PÁÂ..­ì¨Ó¬O¤Ö¤Fsheets
­ì¥»¼gªk...ThisWorkbook.Activate

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-5-25 09:38 ½s¿è

¦^´_ 64# starry1314


    §Ú¤£ª¾¹D§A­ì¬¡­¶Ã¯ªº¤u§@ªí¦WºÙ¬O¤°»ò¡A§Ú°²³]¥¦¬O"¥XÀ\³æ"³oªº¤u§@ªí
ThisWorkbook.Sheets("¥XÀ\³æ").Activate
"ThisWorkbook"¬O­ìµ{¦¡©Ò¦bªº¬¡­¶Ã¯

TOP

¦^´_ 59# lpk187


    L¤j~·Q½Ð°Ý¤@¤U
­n«ç»ò³Ì«á¤@¦æ¥[¤Jwindows«ü¥O¥iÅý¥Lªð¦^¥¨¶°©Ò¦s¦bªºµøµ¡,©Î¬O¦b­þ¸ÌÂIÀ»¥¨¶°´N¸õÂà¦^¨Ó
  1.     Sheets("¼Æ¾Ú").Select
  2.     Range("B27").Select
  3.     Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
  4.     Sheets("§Ö³t¿é¤J").Select
  5.     Range("B2") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("H1").Address(, , , 1)
  6.     Range("C3") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("C5").Address(, , , 1)
  7.     Range("D3") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("L1").Address(, , , 1)
  8.     Range("B4") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("B3").Address(, , , 1)
  9.     Range("B5") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("E1").Address(, , , 1)
½Æ»s¥N½X

TOP

¦^´_ 62# GBKEE

·PÁ»¡©ú~§Ú¦A¸Õ¸Õ¬Ý¡I

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-5-12 15:41 ½s¿è

¦^´_ 60# starry1314

  1. Sub Ex()
  2.     End
  3.     '·í°õ¦æ¨ì End ³¯­z¦¡®É¡A³¯­z¦¡·|­«·s³]©w¦b©Ò¦³¼Ò²Õ¤¤ªº©Ò¦³¼Ò²Õ¼h¦¸ÅܼƥH¤Î©Ò¦³ÀRºA°Ï°ìÅܼơC
  4.     '­Y­n«O¯d³o¨ÇÅܼƪº­È¡A½Ð¨Ï¥Î Stop ³¯­z¦¡¨Ó¨ú¥N End ¡AµM«á±z¥i¥H¦bµy«áÄ~Äò°õ¦æ¡C
  5. End Sub
½Æ»s¥N½X
¼Ò²Õ¦@¥Îªº¨p¥ÎÅܼưõ¦æ«á·|¦s¦b©ó VBA¤¤
­Y¦³°õ¦æ End ³¯­z¦¡
©Î¦p¹Ïªº ­«·s³]©w
ÅܼƻݦA«×³]©w
¤]´N¬O»¡
µ¹§Aªº Sub Main()¶·°õ¦æ¤@¦¸,
µ¹§Aªº Sub Ex() ¤~¨S¦³¿ù»~ªº
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 58# GBKEE


    ¥Ø«e§ï¬°¥H¤U«ü¥O,¤w¸Ñ¨M³sµ²°ÝÃD,
  1. Sub ¤pÀ\³æ_AÀ\_¦Û°Ê¿é¤J¸ê®Æ()
  2.     Sheets("¼Æ¾Ú").Select
  3.     Range("B22").Select
  4.     Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
  5.     Sheets("§Ö³t¿é¤J").Select
  6.     Range("B2") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("H1").Address(, , , 1)
  7.     Range("C3") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("C4").Address(, , , 1)
  8.     Range("D3") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("V1").Address(, , , 1)
  9.     Range("B4") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("X3").Address(, , , 1)
  10.     Range("B5") = "=" & ThisWorkbook.Sheets("¥XÀ\³æ").Range("E1").Address(, , , 1)
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 58# GBKEE


   ª©¥D¤j¤j~¤£¦n·N«ä  ¨Ï¥ÎF8³v¦æ°õ¦æ®É
WbSh(1). ·|¸õ¥X¨S¦³©w¸q³o­ÓSUB©Îfunction
¦ý¬Ý¤W¤èMANI«ü¥O¤¤´N¤w¦³©w¸q..½Ð°Ý¬O­þÃ䤣¹ï©O...
Sub Ex()

    WbSh(1).Range("B22").Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    With WbSh(3) '¤£¥² Select¨Ó Select¥h
        .Range("B2") = "=" & WbSh(2).Range("H1").Address(, , , 1)
            '¥Î¤½¦¡³sµ²
        .Range("C3") = "=" & WbSh(2).Range("C4").Address(, , , 1)
        .Range("D3") = "=" & WbSh(2).Range("V1").Address(, , , 1)
        .Range("B4") = "=" & WbSh(2).Range("X3").Address(, , , 1)
        .Range("B5") = "=" & WbSh(2).Range("E1").Address(, , , 1)
    End With
End Sub

TOP

¨þ¨þ¨þ¡Iª©¥D¤j¤j¤Ó±j¤F¡A»¡¯uªº·íªì§Ú¨S¬Ý¨ì
ActiveSheet.Paste Link:=True³o¦æ
ÁÙ¦A·Q«ç»ò¦^starry1314³o­Óµ{¦¡½X¡Aª©¥D¤j¤j´N¥X¤â¬Û§U¡A³oµ{¦¡½X¤]Åý§Ú¨ü©ö¨}¦h

TOP

¦^´_ 57# starry1314
  1. Option Explicit
  2. '¼Ò²Õ³»ºÝªº Dim ¬°³o¼Ò²Õ¤¤µ{¦¡¥i¥ÎªºÅܼÆ
  3. Dim WbSh(1 To 3) As Worksheet  '«Å§iÅܼƫ¬ºA «ü©w¬°¤u§@ªí
  4. Sub Main()
  5.     Set WbSh(1) = ThisWorkbook.Sheets("¼Æ¾Ú")
  6.     'ThisWorkbook.Sheets("¥XÀ\³æ")¦p§ï¬° "¥XÀ\³æA"
  7.     Set WbSh(2) = ThisWorkbook.Sheets("¥XÀ\³æ") '¦b¦¹§ï¬° "¥XÀ\³æA"¤F´N¥i¥H¤F
  8.     Set WbSh(3) = ThisWorkbook.Sheets("§Ö³t¿é¤J")
  9.     Call Ex
  10. End Sub
  11. Sub Ex()
  12.     WbSh(1).Range("B22").Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
  13.     With WbSh(3) '¤£¥² Select¨Ó Select¥h
  14.         .Range("B2") = "=" & WbSh(2).Range("H1").Address(, , , 1)
  15.             '¥Î¤½¦¡³sµ²
  16.         .Range("C3") = "=" & WbSh(2).Range("C4").Address(, , , 1)
  17.         .Range("D3") = "=" & WbSh(2).Range("V1").Address(, , , 1)
  18.         .Range("B4") = "=" & WbSh(2).Range("X3").Address(, , , 1)
  19.         .Range("B5") = "=" & WbSh(2).Range("E1").Address(, , , 1)
  20.     End With
  21. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD