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

EXCEL§ì¨úCSV¸ê®Æ¨Ã§Y®É§ó·s

ª©¤j
§Ú¬Oµ{¦¡¤j¥~¦æ
1.¤W­zªºµ{¦¡ ¬O©ñ¨ì¤u§@ªí1ªºVB¸Ì
ÁÙ¬O©ñ¨ìModule1¶Ü??
2.Application.OnTime Time + #12:00:01 AM#, "¤u§@ªí1.Ex"
'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ
¬O­n§ï¦¨??
Application.OnTime Time + #12:00:01 AM#, "Module1.Ex"
3.§Ú±Nµ{¦¡©ñ¨ì¤u§@ªí1ªºVB¸Ì
ÁÙ¬O­n¥h «ö¥¨¶° ¦A«ö°õ¦æ
­n¦p¦óÅܦ¨¤@¶}ÀÉ®× ´N°¨¤W·|°õ¦æ

=============
This Workbook¸Ì
Private Sub Workbook_Open()
Ex
        End Sub
=============
Module1¸Ì©ñµ{¦¡
Sub Ex()
    Dim Ar As Variant, E As Range, i As Integer
    'd:\  ½Ð­×§ï¬°¥¿½T¸ô®|
    With GetObject("d:\tttt.csv").Sheets(1)
        Ar = Split(Trim(.[a1]), Space(2))
        .Parent.Close 0
    End With
    i = 0
    For Each E In ActiveSheet.[A1,A2,B5,E5,C5]
        E = Ar(i)
        i = i + 1
    Next
    Application.OnTime Time + #12:00:01 AM#, "¤u§@ªí1.Ex"
    'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ
=====================
¿ù»~°T®§

TOP

¦^´_ 21# bqwangs
  1. Application.OnTime Time + #12:00:01 AM#, "¤u§@ªí1.Ex"
  2. 15.    'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ (¤u§@ªí1 ¬Oª«¥ó¼Ò²Õ)
½Æ»s¥N½X
  1. 'This Workbook¬O (ª«¥ó¼Ò²Õ)
  2. Private Sub Workbook_Open()
  3. Ex
  4.         End Sub
  5. =============
  6. 'Module1¸Ì©ñµ{¦¡(Module1¬O¤@¯ë¼Ò²Õ)
  7. Sub Ex()   
  8.     Dim Ar As Variant, E As Range, i As Integer
  9.     'd:\  ½Ð­×§ï¬°¥¿½T¸ô®|
  10.     With GetObject("d:\tttt.csv").Sheets(1)
  11.         Ar = Split(Trim(.[a1]), Space(2))
  12.         .Parent.Close 0
  13.     End With
  14.     i = 0
  15.     For Each E In ActiveSheet.[A1,A2,B5,E5,C5]
  16.         E = Ar(i)
  17.         i = i + 1
  18.     Next
  19.     Application.OnTime Time + #12:00:01 AM#, "Ex"
  20.     'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ,(Module1¬O¤@¯ë¼Ò²Õ OnTim¥i¥H¤£«ü©ú ¼Ò²Õ¦WºÙ)
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD