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

[µo°Ý] ©I¥s¥~³¡¿W¥ß°õ¦æÀÉ®×¥¨¶°

[µo°Ý] ©I¥s¥~³¡¿W¥ß°õ¦æÀÉ®×¥¨¶°

½Ð°Ý¤j¤j­Ì¡A·Q¥ÎAÀÉ®×µ{¦¡½X©I¥s¿W¥ß°õ¦æBÀÉ®×sub msg()¡A   
    Dim xlApp As Excel.Application
    Dim book As Excel.Workbook
    Dim sheet As Excel.Worksheet
    Set xlApp = CreateObject("excel.Application")
    Set book = xlApp.Workbooks.Open("D:\¤½¦¡.xls")
    ¦¹³B¥i¥H¿W¥ß°õ¦æ¶}±ÒBÀÉ®×

    Application.Run "'D:\¤½¦¡.xls'!Module1.msg"
    ¦¹³BµLªk¥H¿W¥ß°õ¦æBÀÉ®×msg()¡A¤´¥HAÀÉ®×°õ¦æmsg()
  
    ½Ð°Ý¤j¤j­Ì¸Ó¦p¦ó¼¶¼g©O?  
    ½Ð«ü¾É«ü¾É¡AÁÂÁÂ
§Ú¬O´µ¦h

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2021-7-11 17:36 ½s¿è

Application.Run "'¤½¦¡'!Module1.msg"
©Î
Application.Run "'¤½¦¡.xls'!Module1.msg"

TOP

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2021-7-11 18:58 ½s¿è

¦^´_ 1# reangame


¦¹¬°½d¨ÒÀÉ®×
°O±o¶}±Ò®É ¨C­ÓÀÉ®× ¥Ñ©ó¬OxlsmÀÉ®× ¥²¶·¥ý¶}±Ò¤@¦¸ ±Ò¥Î¥¨¶° ­«·s¦sÀɤ@¦¸
¤è¥i¥H¥¿±`¹B¦æ

§ó¥¿
Application.Run "¤½¦¡!Module1.msg"
©Î
Application.Run "¤½¦¡.xls!Module1.msg"

Downloads.zip (96.14 KB)

TOP

¦^´_ 3# singo1232001

·PÁÂsingo1232001¤j¤jªº¦^ÂСA±zªºªþÀɤp§Ì¤w´ú¸Õ¡A¦ý¦³°ÝÃD½Ð±Ð¡A
Workbooks("a1").Sheets("¤u§@ªí1").[a1] = i: DoEvents
¤@¶}©l³£¥X¿ù¦b³oÃä¡A§ó§ï¦p¤U«á¥i¥H°õ¦æ¡A
Workbooks("a1.xlsm").Sheets("¤u§@ªí1").[a1] = i: DoEvents
(a2,a3¦P¨B§ó§ï)

¦ýa2¤Îa3¤´µM¬O¦ba1ªºÀɮ׬[ºc¤U¥H°ßŪ¼Ò¦¡¶}±Ò°õ¦æ¡A
°ßŪ¼Ò¦¡¶}±Ò¤§ÀÉ®×a2,a3§¡¥i§¹¦¨°õ¦æ¥¨¶°¡A
¤w¥ý¦æ¤â°Ê¿W¥ß°õ¦æa2¤Îa3ÀÉ¥¼°õ¦æ¥¨¶°¡A
¨ì¦¹¨BÆJ¦@¦³5­ÓÀɮ׶}±Ò1a1,1a2,1a3,1a2°ßŪ,1a3°ßŪ
¤£ª¾¹D­þÃ䦳¿ùÁٽЫü¾É«ü¾É¡A·P®¦¡I

¤p§Ìºc·Q¬O¦bAÀɮשI¥sBÀÉ®×¥H¿W¥ß°õ¦æ¤è¦¡¶}±Ò¨Ã°õ¦æ¥¨¶°¡A
¦ýAÀÉ®×¥i¥HÄ~Äò¶i¦æ¤â°Ê¤u§@©Î¨ä¥L¥¨¶°¡A¦ÓBÀɮ׫ùÄò°õ¦æ¥¨¶°¡A
    Dim xlApp As Excel.Application
    Dim book As Excel.Workbook
    Dim sheet As Excel.Worksheet
    Set xlApp = CreateObject("excel.Application")
    Set book = xlApp.Workbooks.Open("D:\¤½¦¡.xls")
    ¦¹³B¥i¥H¿W¥ß°õ¦æ¶}±ÒBÀÉ®×
    Application.Run "'D:\¤½¦¡.xls'!Module1.msg"
    ¦¹³BµLªk¥H¿W¥ß°õ¦æBÀÉ®×msg()¡A¤´¥HAÀÉ®×°õ¦æmsg()

¤W­z¼gªk¤´»Ý§JªA¥H¤U°ÝÃD¡G
¤@¡B¥i¶}±Ò¿W¥ß°õ¦æBÀɮסA¦ýµLªk°õ¦æBÀÉ®×¥¨¶°¡F©Î   ¥i°õ¦æ¥¨¶°¦ý«o¬O¥HAÀɮ׬[ºc¤U¶}±Ò
¤G¡B¦]µ{¦¡½X¼¶¼g¦bAÀɮסA¬G©I¥sBÀÉ®×°õ¦æ¥¨¶°¥¼§¹¦¨«e¡A±±¨îÅv¤´¦bBÀɮסAµLªk©I¥s«áÂkÁÙ±±¨îÅv

¥H¤WÁٽФj¤j«ü¾É«ü¾É¡A·P¿E³á¡I
§Ú¬O´µ¦h

TOP

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2021-7-13 10:16 ½s¿è

¦^´_ 4# reangame


¦nÃø³áQQ
https://www.youtube.com/watch?v=EGXPQs0R5YI
https://www.youtube.com/watch?v=lFSgV2gym9g

§Ú§â»`¶°ªº¨ì©Ò¦³¬ÛÃö°T®§³£¥á¤W¨Ó
http://forum.twbts.com/thread-19128-1-1.html
http://forum.twbts.com/viewthread.php?tid=2691
https://stackoverflow.com/questions/39519805/how-can-i-load-a-vba-library-reference-and-use-it-in-the-same-procedure


´ú¸Õ¤è¦¡
1.¥ý§âa1 a2¨â­ÓÀɮתºa1 ³£²M±¼ ³£¦sÀÉ Ãö³¬
2.°õ¦ævba3.vbsÀÉ®×
3.Àˬda1¬O§_5000®É¦A¥´¶}

¥t¥~¸É¥R
ÁÙ¦³3­ÓÃöÁä¦r
VBComponent
ProcOfLine
InsertLines

³o­Ó¬O§Q¥Î  VBComponent §ä¥X¥¨¶°¦s©ñªº¦ì¸m
¦³¤À¦¨¼g¤J»PŪ¨ú
¦ý«Ü½ÆÂø ­nªá®É¶¡¥h¦º¶ß¤@µf
ÃøÂI¦b©ó ¦p¦ó¤Þ¥Î ¦¨¥\
¦³ªºexcelª©¥»¯S§O¤£¬Û®e
¦³ªºª©¥»¬Æ¦Ü³sset³£¤£¥Î

³Ì«á¸É¥R¤@¤U ¤§«eªºÀÉ®×
­n§â©Ò¦³ªº:doevents ³£§R±¼ ¦]¬°·í®É§Ú¦b´ú¸Õ µ²ªG§Ñ¤F§R «Ü®e©ö½Ä¬ð

Downloads.zip (37.32 KB)

TOP

¦^´_ 5# singo1232001

¥Ñ©ó¨C¥x¹q¸£ªº¦ì¸m¤£¦P
¥²¶·¥ý¿ï vba3.vbs ¥kÁä>½s¿è·í¤¤ªºa1.xlsm »Pa2.xlsm¸ô®|
§¹¦¨«áÀx¦s ¤è¥i¥¿±`°õ¦æ

Downloads.zip (25.85 KB)

TOP

¦^´_ 6# singo1232001

·PÁÂsingo1232001¤j¤j¡A
¤p§Ì¦bAÀÉ®×¥[¤JSub runVBScript()¡Aªº½T¥i¥H¹ê²{AÀÉ®×±±¨îBÀÉ®×°õ¦æ¥¨¶°¤F¡A
¤]§ä¨ì¦bAÀÉ®×VBAµ{¦¡½X±±¨îvbsÀɮתº¤èªk¡A«D±`·PÁ±z¡I
  1. Sub runVBScript()
  2.     ChDrive "C:"
  3.     ChDir "C:\Users\reang\Downloads\2"
  4.     Shell "cscript vba3.vbs"
  5. End Sub
½Æ»s¥N½X
§Ú¬O´µ¦h

TOP

2.rar (31.35 KB) ¦^´_ 6# singo1232001
§Ú¬O´µ¦h

TOP

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2021-7-15 02:48 ½s¿è

¦^´_ 8# reangame

«á¨Ó§Ú¸ÕµÛ¥Îvba¦Û°Ê¥Í¦¨¤@­Ó¥þ·sªºvbs
µM«á¤SÅývba¥h°õ¦æ³o­Óvbs
¦ý¬O¥X²{¤@­Óª¬ªp
¦b§Úªº"¤U¸ü"¸ê®Æ§¨¤U ¨Ã¤£·|²£¥Í±Ò¥Î¥¨¶°ªºÄµ§i(§Y«K§Ú§ïÀɦWÅý¥L«ì´_¨ì»Ý­n±Ò¥Î¤º®eªºª¬ªp) ÁÙ¬O¥i¥H°õ¦æ
¦ý¥u­n§Ú§âÀÉ®×·hÂ÷¶}¨ì¨ä¥L¸ê®Æ§¨
´N¤@©w·|¸õ¥X ±Ò¥Î¥¨¶° Ãö³¬¥¨¶° ªº¼uµ¡
³o°ÝÃD¬Ý¨ÓÁÙ¬O¨S¿ìªk§¹¥þ¸Ñ¨M±¼

¦ý§Úµo²{¤F³o­Ó
https://ithelp.ithome.com.tw/articles/10159964

¸ò«Ü¤[¤§«e§Ú¬Ý±o³o­Ó¦³ÂI¹³
https://www.youtube.com/watch?v=G-2khNFYQl8
http://forum.twbts.com/thread-19128-1-1.html
³o­Ó¬O¥Îvbaª¦ÂÎ ¦ý·|ª¦¨ì¤@¥b¸I¨ìĵ§ialert¥d¦í ¦ý¦]¬°¨S¦³¦h½uµ{³oºØªF¦è ©Ò¥H½Ðvbs¨ÓÀ°¦£ÂI­ÓÆg!
vbaªº¹B§@ ºwµªºwµª  ºwµª¤§¶¡ ¬O¨S¿ìªk¸õ½uµ{ªº  µªºw¤§¶¡¤~¥i¥H ¦ý³q±`´N¬O¥d¦bºwµª¤§¶¡
¬Ý°_¨Ó«Ü¹³¦h½uµ{ ¦ýÁÙ¬O¥u¯à³æ½uµ{¹B¦æ ¥u¬O´«¨Ó´«¥h¶]¦Ó¤w

¦Ó³o¦¸¥L¥Î¨ìªº¦n¹³¬O©I¥svbs½ÐAutoHotKey¨ÓÀ°¦£ÂI­ÓÆg

TOP

¦^´_ 9# singo1232001


    ·Q¸ÕµÛ§¹¥þ¤@Áä·d©w ¦ýÁÙ¬O±Ñ¦b ¥¨¶°±Ò¥ÎªºÄµ§iµe­±

·s¼W¸ê®Æ§¨.zip (43.03 KB)

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD