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

[µo°Ý] §Q¥Î Combobox ¨M©w°j°é°_©l¨ìµ²§ô­È

[µo°Ý] §Q¥Î Combobox ¨M©w°j°é°_©l¨ìµ²§ô­È

¥»©«³Ì«á¥Ñ a703130 ©ó 2012-3-26 17:26 ½s¿è

§Ú·Q½Ð°Ý¤j¤j

¥Ø«e§Ú¦³µ{¦¡¬O§Q¥Îsheets(i)¨Ó°µ°j°é
¨Ò¦p
  1. For i=6 to 16
  2.     sheets(i)...
  3.     ...
  4.     ...
  5.     ...
  6. Next
½Æ»s¥N½X
¦ý¬O§Ú¤Sı±o³o¼Ë¼g¦º¤£¤Ó¤è«K
©Ò¥H§Ú·Q­n§Q¥ÎCombobox¨ÓÅý¨Ï¥ÎªÌ¨M©w­n±q­þ­Ó­¶­±¶}©l
Combobox1 ¨M©w¶}©lªº¦a¤èÅܼÆx¡ACombobox2 «h¬Oµ²§ôªº¦a¤èÅܼÆy

¤£ª¾¹DÀ³¸Ó¦p¦ó¼¶¼g³oµ{¦¡??

§Úªº¤u§@­¶©T©w±q²Ä6­¶¶}©l~²Ä16­¶µ²§À
¤@¶}©l­n¥ý±N¤W­±6~16ªºsheetname¥[¤Jcombobox
¨Ï¥ÎªÌÂI¿ïcombobox1¥H¤Îcombobox2 ±a¥X x¡ByÅܼÆ

§Ú¦A±a¤J§Úªºµ{¦¡

¦^´_ 1# a703130
  1. For i = Val(Combobox1) To Val(Combobox2)
  2.     sheets(i)...
  3.     ...
  4.     ...
  5.     ...
  6. Next
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


    ©êºp¤j¤j§Úªº°ÝÃD~°Ý±o¤£¦n³y¦¨±zªº²z¸Ñ¤W¦³¸¨®t
    §Ú»¡ªºcombobox ¬O¤U©Ô¦¡¤è¶ô

TOP

¦^´_ 3# a703130
¨S¦³»~¸Ñ,§A¬OComboBox1,ComboBox2 ªº¤º®e¤£ª¾¦p¦ó¥[¤W¶Ü?
  1. Sub Ex()
  2.     Dim xi As Integer
  3.     ComboBox1.Clear
  4.     For xi = 1 To Sheets.Count
  5.         ComboBox1.AddItem xi
  6.     Next
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE

¹ï¡A¦]¬°§Úfor °j°éªº°_©l-µ²§ô ¬Osheets()
°Q½×°Ï¤W±Ðªº¬O¥Î  ComboBox1.List = Array()

§Ú´N¤£ª¾¹D­n¦p¦ó§Q¥Î sheets©Ò¦bªº­¶­±number·í§@°j°éªº°_©l-µ²§ô

¥t¥~§Ú¤]¤£ª¾¹D­n¦p¦ó¦bExcel ¥´¶}ªº®É­Ô±Nsheets(6)~sheets(16)ªºName ©ñ¤J combobox1¡Bcombobox2 ªº¦Cªí¸Ì­±

TOP

¦^´_ 5# a703130


    ­n¤£­n¼g¤@­Óexcelªºex´£¨Ñ¤@¤U©O??
    ³o¼ËG¤j¤j©Î¨ä¥L¤j¤j¤ñ¸û²M·¡§A­nªºµ²ªG¬O«ç»ò¼Ë~
    ¤£¥Î¹³½M¤lºN¶H¤@¼Ë~ Á¿¤£²M·¡~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 5# a703130

­n¦bComboBox¤º¥[¤J¶µ¥Ø´N¬OAdditem¥u¤£¹L¬O§A­n¥[¬Æ»ò®Æ´N¦Û¤v¥h«ä¦Ò¦p¦ó¨ú±o¨º¨Ç¦r¦ê
¦p§A©Ò»¡­n¥[¤J6¨ìnªº¤u§@ªí¦WºÙ
for i=6 to n
combobox1.additem sheets(i).name
next
¥u¤£¹L­nª`·Nªº¬O¡A¦bµ{¦¡¨S¦³Ãö³¬¤§«e¡A¬ü°õ¦æ¤@¦¸´N·|­«½Æ¥[¤J¶µ¥Ø¡A¬°ÁקK­«½Æ¥[¤J
¦b°õ¦æ®É¥ý²M°£«á¦A·s¼W
combobox1.clear
for i=6 to n
combobox1.additem sheets(i).name
next
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# Hsieh

ÁÂÁ H ¤j¥H¤Î¤W­±¤j¤j¡Aµo°Ý¤]¬O¤@ªù¾Ç°Ýªü
¨ä¹ê§Úªº°ÝÃD«Ü²³æ´N¬O
§Ú¦b¤@¶}©l¶}±ÒExcel «á­nÅýCombobox1¦Û°Ê¸ü¤JSheets(i)
¦Ó combobox1.additem sheets(i).name ¸Ñ¨M¤F§Úªº°ÝÃD
¦]¬°§Ú¦badditem¸ò sheet(i).name ¦h¤F¤@­Ó =

TOP

¦^´_ 8# a703130

§A³o°ÝÃD¥i¯à´N¬O¤j³¡¤À­è±µÄ²VBAªº¤H³£¦³ªº°ÝÃD
VBAªº«ü¥O¤j­P¤W¦³ª«¥ó¡BÄÝ©Ê¡B¤èªk¡B¨ç¼Æ
ÄÝ©Ê»yªk´N¬O
ª«¥ó.ÄÝ©Ê=­È

¤èªk»yªk´N¬O
ª«¥ó.¤èªk ­È

¨ç¼Æ»yªk´N¬O
ÅܼÆ=¨ç¼Æ(¤Þ¼Æ)
³o´N¬O¤@¯ëªº»yªk
¦Ü©óµ{¦¡¬yµ{«ä¦ÒÅÞ¿è
¦ó®É?°µ¬Æ»ò°Ê§@?Åý¬Æ»òª«¥ó?¥Î¬Æ»ò¤èªk?°µ¬Æ»ò¨Æ?
³o¬Oª«¥ó¾É¦Vµ{¦¡ªº°ò¥»ÅÞ¿è·§©À
©Ò¥H¡A¥ý·d²M·¡"¨Æ¥ó"¡B"ª«¥ó"¡B"¤èªk"¡B"ÄÝ©Ê"¬O±µÄ²VBA²Ä¤@ªù½Òµ{
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD