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

[µo°Ý] VB «ö¶s¨úTEXTBOX °ÝÃD¡C

[µo°Ý] VB «ö¶s¨úTEXTBOX °ÝÃD¡C

§Ú·Q¦bVB§Ë¤@­ÓTEXTBOX,·í§Ú¿é¤J¤F¦WºÙ«á,«ö¤U«ö¶s¥L´N·|¶}§Ú¬°³o­ÓÀɮצì¸m©w¸q¤Fªº¦WºÙªºÀÉ®×¥X¨Ó,¨Ò¦p§Ú³]©w 123¬°¤@­ÓÀɮתº¦ì¸m,·í§Ú¦bTEXTBOX¤¤¿é¤J123«á¦A«ö¤U«ö¶s,¥L·|¥´¶}§Ú§â¥L³]©w¤F123©Ò¦s¦bªºÀÉ®×¥X¨Ó,¦Ó§Ú¦³«Ü¦hÀɮתº¦ì¸m»Ý­n³]©w,½Ð°Ý¦p¦ó¾Þ§@,¥»¤H¬O·s¤â,§Æ±æ¯à¦³°ª¤â«ü±Ð¤@¤U¡C

¬d¤F¤@¤U¸ê®Æ,­n¦bBUTTON¤º¨úButton¸Ì­±¥ý¥h¨ú¥XTextBox1.Captionªº­È,¦A¥Î¥ÎSwitch Caseªº¤èªk¥h¶}ÀÉ®×,¦ý¥»¤H¥Ñ©ó¬O¨S¦³¸gÅç,©Ò¥H¼È¤£ª¾¹D¦pªG¾Þ§@,½Ð«ü±Ð¤@¤U,¸÷Á¡C

¦^´_ 1# whoislee


   
½Ð¥ý³]­p¤@­ÓForm
¦b¸Ì­±³]­p¤@­ÓTextBox¤ÎButton
TextBox=«ü©wªºÀɮצWºÙ
Button=½T»{µ{§Ç°õ¦æ
TextBox¥i¥H¦bÄݩʤ¤­×§ïname
¤@¯ë¨Ì·ÓTextBox¬y¤ô½s¸¹«Ø¸m
¦p²Ä¤@­Ó«Ø¸mªºTextBox¬°TextBox1
²Ä¤G­Ó«Ø¸mªºTextBox¬°TextBox2
µ{§Ç¤¤­n´£¨ú¥X­È¼g¬°
  1. TextBox1.Text
½Æ»s¥N½X
¦pªGname­×§ï¬°IDµ{§Ç¤¤¼g¬°
  1. ID.Text
½Æ»s¥N½X
«ü©w­n¶}±ÒªºÀÉ®×Ãþ«¬«Å§iObject
  1. CreateObject(class,[servername])
½Æ»s¥N½X
¶}±ÒExcel½d¨Ò:(¤ù¬qµ{§Ç)
  1. If name.Text = "" Then
  2. MsgBox("½Ð¿é¤JÀɦW", , "ª¬ºA°T®§")
  3. Exit Sub
  4. End If
  5. Dim WB, XL As Object
  6. XL = CreateObject("Excel.Application")
  7. XL.Visible = False
  8. WB = XL.Workbooks.Open("\\¸ô®|\ & name.Text & ".xlsx")
½Æ»s¥N½X
¤@¤À§V¤O¡A¤@¤À¦¬Ã¬¡C
µo°ÝÃD«e¥i¥H¥ý·j¯Á¤º¤å¬O§_¦³¬ÛÃö½d¨Ò¡C

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD