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

[µo°Ý] ¦p¦ó«ü©w¶}±ÒªºWorkbook?

[µo°Ý] ¦p¦ó«ü©w¶}±ÒªºWorkbook?

µ{¦¡°õ¦æ«e¶·¶}±Ò¯S©wÀÉ®×(Analysis.xlsx)¦A±qªí³æ¿ï¾Ü­n­pºâ(¶}±Ò)ªºÀÉ®×
©Ò¥H¦b«°¥«°õ¦æ¹Lµ{·|¦³¨â­Ó.xlsxÀɮ׶}±Ò¡A¤@­Ó¬O©T©wÀɦW(Analysis.xlsx -AÀÉ®×)¥t¤@­Ó¬O¤£©wÀɦW(BÀÉ®×)·|ÀH¨Ï¥ÎªÌ¶}±Òªº·í®×¦Ó¦³©Ò¤£¦P
¦p¦óÅý«ü©wµ{¦¡²{¦b¬O­n§ì¨úAÀɮשÎBÀÉ®×?
§Ú¥Ø«eªº§@ªk¬O¥H¶}±Òªº¶¶§Ç§P§O:
Workbooks(2):AÀÉ®×     ¦]¬°¦³­Ó¤H¬¡­¶Ã¯personal.xls¦s¦³¥¨¶°
Workbooks(3):BÀÉ®×
--------------------------------------------------------------------
¦]¬°§Úªºµ{¦¡¬OÂà¦s¦¨¼W¯q¶°¥H«K©ó¦b¤£¦P¹q¸£¸Ì¨Ï¥Î
·í©Ò¨Ï¥Îªº¹q¸£¸Ì­Ó¤H¬¡­¶Ã¯personal.xls¨S¦³¦s¥¨¶°«h¶¶§Ç·|Åܦ¨
Workbooks(1):AÀÉ®×
Workbooks(2):BÀÉ®×
©Ò¥H§Ú±N¥¦§ï¦¨
Set xfile = Workbooks("Analysis")   'Workbooks(2)
¦ý¹ï©óBÀɮ׫h¤£ª¾¸Ó¦p¦ó©R¦W¬°yfile
½Ð¤j¤jÀ°¦£¸Ñ´b
ÁÂÁÂ

¦^´_ 1# acdx
¦b«°¥«°õ¦æ¹Lµ{·|¦³¨â­Ó.xlsxÀɮ׶}±Ò¡A¤@­Ó¬O©T©wÀɦW(Analysis.xlsx -AÀÉ®×)¥t¤@­Ó¬O¤£©wÀɦW(BÀÉ®×)·|ÀH¨Ï¥ÎªÌ¶}±Òªº·í®×¦Ó¦³©Ò¤£¦P


    BÀɮ׬O¥ÎWorkbooks.open¶}±Òªº§a¡A§A¥i¥H¦b«e­±¶}±ÒBÀɮתº¨º®É­Ô´N¥h°Ñ·Ó¥¦¤F¡C
    Dim yfile as WorkBook
    Set yfile = Workbooks.open("BÀɮ׸ô®|")

TOP

¦^´_ 2# stillfish00

ÁÂÁÂ!
§Ú±N¥¦§ï¦¨:
Set yfile = Workbooks.Open(TextBox1.Value) (¦]¬°Àɮ׸ô®|¥ÑUserform©Ò¸ü¤JTextBox1)
¥i¦¨¥\°õ¦æ

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD