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

[µo°Ý] ­n¿é¥X¤@­ÓÀÉ¥i¥H³o¼Ë¼g?

[µo°Ý] ­n¿é¥X¤@­ÓÀÉ¥i¥H³o¼Ë¼g?

½Ð°Ý  Åª¶i¤@µ§¸ê®Æ(.txtÀÉ)¥i¥H³o¼Ë¼g:
open file_name for input as #1
       input #1, str_name
  close #1

¨º»ò¿é¥X¤@µ§¸ê®Æ(TXTÀÉ)¥i¥H³o¼Ë¼g¶Ü?
open file_name for output as #1
      print #1, str_name
  close #1

¦bVBA¤¤¤]¦³ Random File ¶Ü? ¤]¬O³o¼Ë¾Þ§@ªº¶Ü?
open file_name for random as #1 len = rec_len
      get #1, ren_num, str_name                         ' rec_num «ü¦bÀɮפ¤²Ä ? µ§¸ê®Æ
  close #1
V98

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-7 22:20 ½s¿è

¦^´_ 1# linshin1999
½Ðµ½¥ÎVBA»¡©ú½d¨Ò

    VBA»¡©úÀÉ
Get ³¯­z¦¡½d¨Ò
¥»½d¨Ò¨Ï¥Î Get ³¯­z¦¡¨Ó±N¸ê®Æ±qÀɮפ¤Åª¨ìÅܼƤ¤¡C½d¨Ò¤¤°²³] TESTFILE Àɮפ¤§t¦³¤­µ§¨Ï¥ÎªÌ¦Û­q«¬ºAªº¸ê®Æ°O¿ý¡C

Type Record    ' ©w¸q¨Ï¥ÎªÌ¦Û­qªº¸ê®Æ«¬ºA¡C
    ID As Integer
    Name As String * 20
End Type

Dim MyRecord As Record, Position    ' «Å§iÅܼơC
' ¥HÀH¾÷¦s¨úªº¤è¦¡¨Ó¶}±ÒÀɮסC
Open "TESTFILE" For Random As #1 Len = Len(MyRecord)
' ¨Ï¥Î Get ³¯­z¦¡¨ÓŪ¨úÀɮפº®e¡C
Position = 3    ' ©w¸q°O¿ý½s¸¹¡C
Get #1, Position, MyRecord    ' ±N¦¹°O¿ýŪ¤JÅܼƤ¤¡C
Close #1    ' Ãö³¬ÀɮסC
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh ª©¥D,¬°¤°»ò§A¦b  VBA »¡©úÀÉ¥i¥H§ä¨ì,¦Ó§Ú§ä¤£¨ì? Á¨ì¤F,ÁÂÁÂ!!
V98

TOP



¦n¤[¨S¬Ý¨ì³o¼Ëªº¼gªk¤F
¥u§âEXCEL·íVB¥Î§ì¶i¨Ó
ºâ¤@ºâ´N¦s¥X¥h
¤£®¢¤U°Ý,¤£Â_¾Ç²ß,¤~·|¶i¨B

TOP

4# OFFICE±M®a

ÁÂÁ§Aªº«ü¾É,¦³¨ì§Aªº³¡¸¨®æ³}¤F¤@¤U,«Ü­±¼ô,§Ú¤@ª½¦b¥Î¨º¼Ëªº¼gªk,¤£¹L¦b (VB2010) ¦n¹³¤£«Øij¥Î¤F!
V98

TOP

¦^´_ 5# linshin1999

¨þ¨þ^^
¬Ý¬Ý»P¬d¬ÝVBE¤¤ªº»¡©ú¡A¬Ý¬Ý¥i¤£¥i¥H
   
¤£®¢¤U°Ý,¤£Â_¾Ç²ß,¤~·|¶i¨B

TOP

¦^´_ 6# OFFICE±M®a

1) ¨º­Ó?¸¹¥Î¹L¤F(¦bVBE¤¤ªº)¦ý¬O­n¥Î Open ¥h§ä, ¦ý¬O没·Q¨ì Vba ¤¤¦³¥Î¨ì Open ³o­Ó«ü¥O, VB2010 ³£¥Îstream¨Ó³B²z¤F.

2)¦A°Ý¤@­Ó°ÝÃD, ¦p¦ó¦bVBA¤¤ªº°}¦C¥h§@±Æ§Çªº°Ê§@,(«D range, worksheet) ? ¸¹¥h§ä SORT §ä¤£¨ì, ¹Á¸Õ¥Î Swap «ü¥O¦æ¤£³q, Ãø¨ì­n¥Î³o¼ËªºªF¦è¶Ü?
   a = b
   b = c
   c =  a ¶Ü?

V98

TOP

¦^´_ 7# linshin1999

VB»PVBAªº³Ì¤j®t²§
VB¬O¥þ·s±M®×¡A«Ü¦h¨ç¼Æ¡Bª«¥ó©Î¤èªk³£¥²¶·¦Û¤v¥h¼g¡AµM«á®³¨ÓÀ³¥Î
VBA¬OªþÄݦbEXCEL¤¤ªº¶}µo³nÅé
§A¥i±NVBAµø¬°VBªº°ª¶¥»y¨¥
©Ò¥HVBA¥iª½±µ¤Þ¥ÎEXCEL¤º«Øªº¨ç¼Æ¤Îª«¥ó
¦Ü©ó»¡©úÀɪº¨Ï¥Î¡A§A±N·Æ¹«´å¼Ð²¾¨ìÃöÁä¦r¤W«ö¤UF1Áä§Y¥i¨ú±o
³o¬O§AÁÙ¤£¼ô±x©Ò­P¡Aµ¥§A¼ô½m¤F´Nª¾¹D¥L¦³¦h¦n¥Î¤F
¨þ!
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# Hsieh


    Excel ¬O  VBA ªº¤÷¨Æ¥ó, (VBA¤Jªù¨t¦CÁ¿®y¤¤½Í¨ìªº) ©Ò¥H VBA ¦³ excel °µ¬°¨Ì¾a, Vb ¬O¿W¥ß¨Æ¥ó­n¦Û¤v¥Î¥\, ÁÂÁ§A±Ð§Ú VBE ¤¤ Help ªº¥Îªk.
V98

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD