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

[µo°Ý] ³]­p¤@­Óªí³æ

[µo°Ý] ³]­p¤@­Óªí³æ

ªí³æ¦³¦h­Óª«¥ó

Á|¨Ò¹J¨ìªº°ÝÃD
ComboBox1 (name) §ï¦¨ ®Æ¸¹1
ComboBox2 (name) §ï¦¨ ®Æ§O1
TextBox1 (name) §ï¦¨ ¼Æ¶q1

°õ¦æ"ªí³æ"®É¤À§O¿ï¾Ü¤F¼Æ­È
®Æ¸¹1 = 2219-007
®Æ§O1 = «OºÞ®Æ
¼Æ¶q1 = 30
«ö¤U½T©w®É«o¦b¿ï¾Ü"«OºÞ®Æ"¤u§@ªí®É¿ù»~¤F Worksheets(®Æ§O1).Select

µ{¦¡¦p¤U
    '¶}±Ò®Æ¸¹¸ê®Æ®w
    Workbooks.Open ThisWorkbook.Path & "\¸ê®Æ®w\" & ®Æ¸¹1 & ".xlsx"
    '¿ï¾Ü®Æ§O
    Worksheets(®Æ§O1).Select       <===¦b³o¦æ°±¤î¤F

ĵ§i¬O
°õ¦æ¶¥¬q¿ù»~ '13':
«¬ºA¤£²Å¦X

½Ð°Ý¤å¦r¤£¬O¥i¥Hª½±µ±a¤J¶Ü?  
±a¤Jªº«¬ºA¬O³o¼Ë¶Ü? Worksheets("«OºÞ®Æ").Select ?

¦^´_ 1# vuptp6
ComboBox2 (name) §ï¦¨ ®Æ§O1
** ©Ò¥H  ®Æ§O1¬OComboBoxª«¥ó**
  1.   Worksheets(®Æ§O1.Value).Select  '**ª«¥óªº­È
  2.   Worksheets(®Æ§O1&"").Select    '**ª«¥ó&""  Âন¤å¦r
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


   ÁÂÁÂ GBKEE¤j
   µ²ªG§Ú¬ðµM¦³·Q¨ì­n§ï¦¨­È:loveliness: :loveliness:
   ¤]´N¬O¥[¤W ".value" ´N¸Ñ¨M¤F
   ÁÂÁÂ~~~~

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2020/4/26 09:03): ¥iªþÀɬݬÝ

¥»©«³Ì«á¥Ñ vuptp6 ©ó 2020-4-26 08:50 ½s¿è

¦A½Ð°ÝGBKEE¤j
¦pªGªí³æ¦³³\¦hª«¥ó
¦ý³\¦h³£¬O¬Û¦ü­«½Æªº

§Ú«o¥u·|¤gªk·Ò¿û¨Ò¦p

    '¶}±Ò®Æ¸¹1
    Workbooks.Open ThisWorkbook.Path & "\¸ê®Æ®w\" & ®Æ¸¹1 & ".xlsx"
    '¿ï¾Ü®Æ§O1
    Worksheets(®Æ§O1.Value).Select
    '´î¥h¼Æ¶q1
    Worksheets(®Æ§O1.Value).Range("F" & i) = "-" & val(¼Æ¶q1)
   ...
    '¶}±Ò®Æ¸¹2
    Workbooks.Open ThisWorkbook.Path & "\¸ê®Æ®w\" & ®Æ¸¹2 & ".xlsx"
    '¿ï¾Ü®Æ§O2
    Worksheets(®Æ§O2.Value).Select
   '´î¥h¼Æ¶q2
    Worksheets(®Æ§O2.Value).Range("F" & i) = "-" & val(¼Æ¶q2)
     ...
     ...

´N¤@ª½­«½Æ¦P¼Ëªº1¨ì9
¦ý³o¼Ëµ{§ÇÅܱo«Ü¤j
¤j¨ìµLªk°õ¦æ
¯à¥Î°j°é§ï¶Ü??

TOP

For i = 1 To 2
    MsgBox Me("®Æ¸¹" & i).Value & "//" & CStr(Me("®Æ§O" & i)) & "//" & Val(Me("¼Æ¶q" & i))
Next i

TOP

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

ÁÂÁª©¥DÀ°§Ú½G¨­¦³¦¨:loveliness: :loveliness:

TOP

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