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

VBA¬O§_¥i¥H«Ø¥ß°ÊºAUserForm

¬Ý¤F¡A¦ý¬O¤´µM¦³¨Ç°ÝÃD¡A¹³Excel§Ú¥Î
Set mynewform = Application.VBE.ActiveVBProject.VBComponents.Add(vbext_ct_MSForm)

¦ý¬O·|¥X²{¥¢±Ñ»¡¡A¤£ª¾¹D­n§ï¤°»ò
clio

TOP

«Øij¤j¤j UserForm ¤£­n¥Î°ÊºA

Set FC = Application.VBE.ActiveVBProject.VBComponents.Add(3)
Set F = UserForms.Add(FC.Name)
    F.Show 0
            
Set TextBox = F.Controls.Add("forms.TextBox.1")
    TextBox.Top = 0
Set ListBox = F.Controls.Add("forms.ListBox.1")
    ListBox.Top = 30
   
MsgBox "Stop"
Application.VBE.ActiveVBProject.VBComponents.Remove FC

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2016-3-17 10:06 ½s¿è

°£«D±M·~, °ÊºAªí³æ¤Îª«¥ó¼W§R, ¹ï·s¤â¬O°ªÃø«×, ¦Ñ¤â¤£¥²µM¥i¥H§¹¥þ´x´¤,
¦pªGÁÙ­nÅý·s¼Wª«¥ó¦³Ä²µo¨Æ¥óµ{¦¡, ´N§ó½ÆÂø,
§Úªº¤è¦¡¬O¹w³]¥²­nª«¥ó, ¦A¥Hµ{¦¡¥h¨M©w­þ¨Çª«¥óÅã¥Ü»P§_,
¦Ü©óCHECKBOXªº¥\¯à, ¦³®É¥ÎLISTBOXªº¦h­«¿ï¾Ü¤]¥i¹F¨ì¥Øªº,
¤£¹Lªí³æªº³]­p¤£ºâ³æ¯Â, ¹ï·s¤â¨Ã¤£®e©ö, ³Ì¦n¥h¶R¥»±Mªù¤¶²Ðªí³æªº®Ñ¬Ý,
¦³°ò¦¤~¯à¥h¹B¥Î¦U¶µ§Þ¥©~~~

TOP

¦^´_ 11# jackyq

·PÁ¤j¤jªº¦^ÂСG
§Ú¦n¹³¦b²Ä¤@¦æ´N·|¥d¦í¡AµLªk°õ¦æªº¹L¥h»¡¡A¤j¤jªº¤]·|³o¼Ë¤l¶Ü¡H
·PÁ¤j¤jªº´£¿ô¡A§Ú·|Å¥±q±zªº«Øij¡AUserForm¤£¨Ï¥Î°ÊºAªº¡A¦]¬°³oÃ䦳¨ÇIJµoÂI¡A¤£¦n³B²z¡A¥u¬O·|·Qª¾¹D«ç»ò¼Ë¥i¥H°ÊºA«Ø¥ßUserForm¥u¬O¦n©_¡A·Q»¡¥i¥H¦h¾Ç¤@¼Ë¦Ó¤w
clio

TOP

¦^´_ 12# ­ã´£³¡ªL

·PÁ­㴣³¡ªL¤j¤jªº¦^ÂÐ
½T¹ê¦p¦P¤j¤j©Ò»¡¡A³o¤G¤Ñ¬ã¨sªº¹Lµ{¤¤¡A¦³¸Õ¹L°ÊºA«Ø¥ßControl¡A©Ò¥H¤]¦n©_¬O§_¯à°ÊºA«Ø¥ßUserForm¡A¦ý¬O¤]¦p¦P¤j¤j©Ò»¡¡Aª«¥óªºÄ²µo¡A³o­Ó­Ë¬O¤@­Ó¤j¤jªº°ÝÃD
·|±µ¨ü­ã¤jªº«Øij¡A§â¤@¨Ç¥i¯à·|¥Î¨ìªº¹w³]¦bUserForm¤º¡A¦A¨Ìµ{¦¡¥N¤Jªº°Ñ¼Æ¡A¨Ó¨M©w¨º¨Ç­nÅã¥Ü¡A³o­Ó½T¹ê¤]¬O§Ú¦Ò¼{¹Lªº¤èªk¤§¤@¡A¥u¬O¹ï©ó³o¤è­±ªº¬ã¨sÁÙ¯uªº¬O¦³®É·|·Qª¾¹D
¦³¨S¦³¾÷·|³o¼Ë§@¡H¤~·|¤S°Ý¤F°ÊºAUserFormªº°ÝÃD¡A§Ú¤]¦³¥hŪ®ÑÀ]¬d¤F¤@¨Ç®Ñ¡A¦ý¬O¹ï©óVBA¸ÔºÉªº¦n¹³¨S¦³¨£¨ì¡A¤£ª¾¹D­ã´£³¡ªL¤j¤j¦³¨S¦³«Øijªº®ÑÄy¡A¥i¥HÅý§Ú¥h¶R¦^¨Ó°Ñ¦Òªº¡A·PÁ±z¡C
clio

TOP

¦^´_ 14# clio


¨S¿ìªk´£¨Ñ¦³­þ¨Ç®ÑÄyªº°Ñ¦Ò, «Øij¥h®Ñ§½§ä, ³o¬O¤u¨ã®Ñ, ¥i¦h¶R´X¥»,
°£¤Fªí³æÀ³¥Î, VBA³Ì°ò¦ªº®Ñ¤]¥²³Æ, ©ñ¦b¤âÃä, ¹J°ÝÃD´N¥h½, §ä¨ì¸Ñ¨M¤èªk, ´N¾Ç¤@©Û,
­Y¨S¦³°ò¦, ¥u¦b¦¹µo°Ý, ¤£¤î°Ý¤£¨ì­«ÂI, §O¤Hµ¹ªºµª®×, ¤]¬O¤@ª¾¥b¸Ñ,
¥t, VBE¤º«Ø»¡©úÀɬO«D±`¦nªº¾Ç²ßºÞ¹D, ªá¨Ç®É¶¡¥h´MÄ_~~~

¾ÇVBA, §Ú¥u«Øij¥Î¡e¤TªáµP¡f--ªá®É¶¡¡Dªáºë¯«¡Aªáª÷¿ú(¶R®Ñ)¡ã¡ã¡ã§OµL¥¦³~
¦³¤F°ò¦¡A¦A¨Ó¬Ý§O¤H¼gªºµ{¦¡¡A´N¦³ÁŵM¶}®Ôªº·Pı¡A«æ¤£¨Ó¡I¡I¡I

TOP

¦^´_ 15# ­ã´£³¡ªL


    ·PÁ¤j¤jªº¦^ÂСA§Ú¤]¬O¥D­n¬O¦b»¡©ú¤º§ä½d¨Ò¡A¾Çªº¡A³o­Ó¯uªº­nªá®É¶¡¡A¬ã¨s¡B´ú¸Õ¡A´N·|µo²{­n»â¦b¨ºÃä¡A¾Ç²ß¹Lµ{¯uªº¬O«Ü´r§Ö¡K
clio

TOP

¨Æ¥ó¥Î¡uª«¥óÃþ§O¼Ò²Õ¡v³B²z¡A«Ü¤è«K¡C

TOP

¦^´_ 1# clio


    1.¥i¥H°ÊºA²£¥Í¤¸¥ó¡Buserform
    2.²z½×¤W¥i¥H¡A¦ý¬Ý©p­n«ç§PÂ_¡A¥u¬O ¤£À´©p»¡ªº·N«ä

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 2# mark15jill

°²¦p¡Aµ{¦¡°ÊºA²£¥Í¤@­ÓUserform, ¦Ó¸Ì­±¦³¤@­ÓListBox¡A³o¼Ë«ç»ò°µ
clio

TOP

        ÀR«ä¦Û¦b : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD