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

[µo°Ý] §ÚªºCheckbox¨S¿ìªk°Ê

[µo°Ý] §ÚªºCheckbox¨S¿ìªk°Ê

§Ú¦bEXCEL¸ÌSheet1³]¤F8­ÓCHECKBOX ¡ASheet2¦³8­Ó¤Hªº¸ê®Æ
ÁÙ¦³¤@­Ó«ö¶s¡A«ö¤U¥h«á·|¦Û°Ê½Æ»s¦³¤Ä¿ïªº¤Hªº¸ê®Æ¨ìSheet1
¥i¬O´N¥d¦bÀˬd¨ºÃö¡Aµ{¦¡¦p¤U
Private Sub CommandButton1_Click()
Dim x, y, z, a As String
Dim i, j As Integer

Sheet1.Range("A2:C9").Value = ""       '²MªÅ¸ê®Æ³B
j = 2

For i = 1 To 8

  If ("CheckBox" & i) = True Then
      
     x = Sheet2.Cells(i + 1, 1).Value     ³o´X¦æ¬O½Æ»s¸ê®Æ
    Sheet1.Cells(j, 1).Value = x
     y = Sheet2.Cells(i + 1, 2).Value
     Sheet1.Cells(j, 2).Value = y
     z = Sheet2.Cells(i + 1, 3).Value
     Sheet1.Cells(j, 3).Value = z
     j = j + 1
  End If
Next
End Sub

¦³¬Ý¹L¤§«e¤å³¹¸Ì­±¦³¥Î If Me.c????l("CheckBox" & i)
                                                   ^^^^^§Ñ¤F
¥i¬O·ÓµÛ¶K¤W¤Sĵ§i¨S¦³«Å§i¤§Ãþªº
PS:§Úª½±µ©ñ¦bEXCEL¡A¨S¦³»s§@USERFORM
½Ð¦U¦ì¥ý¶i«üÂI
ÁÂÁÂ
«¢Åo~¤j®a¦n§r

¦^´_ 1# iceandy6150


    If Sheet1.OLEObjects("CheckBox" & i).Object.Value = True Then
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


    ³á³Á§¼~¤Ó¯«©_¤F
²×©ó¥i¥H¥¿±`¹B§@¤F
¤Ó·PÁ¤j¤j¤F

¥u¬O¬°¤°»ò­n¥[¤@¨Ç....«Ü©_©ÇªºªF¦è¤~¯à¹B§@«¨?
¤£¤ÓÀ´
«¢Åo~¤j®a¦n§r

TOP

¦^´_  Hsieh


    ³á³Á§¼~¤Ó¯«©_¤F
²×©ó¥i¥H¥¿±`¹B§@¤F
¤Ó·PÁ¤j¤j¤F

¥u¬O¬°¤°»ò­n¥[¤@¨Ç....«Ü©_ ...
iceandy6150 µoªí©ó 2013-2-6 18:13


"CheckBox" & i  ¥u¬O¤@­Ó¦r²Å¦ê, ¸ò "123" "abc" ¦P¤@Ãþ
¦pªG·Q§â§ä¥X¨º¤@­Ó±±¥ó¬O³o­Ó¦W¦r¬O ³o­Ó¦r²Å¦êªº, ´N¥i¥H³q¹L OLEObjects(...)§ä¥X
±±¥óªº­ì§Î´N¬O¤@­ÓOLEObject
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 3# iceandy6150


    If Sheet1.OLEObjects("CheckBox" & i).Object.Value = True Then

³o­Ó¤èªk»¡Â²³æÂI´N¬O
¦bSheet1 ¤º ´M§ä ª«¥ó¦WºÙ¬O Checkbox ªºª«¥ó

  ¦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

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD