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

[µo°Ý] UserFormªí³æ¬ÛÃö°ÝÃD

¦^´_ 6# v03586
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub CommandButton1_Click()
  3.     Dim Rng As Range, Ar(1 To 2), i As Integer
  4.     Ar(1) = Array(OptionButton1, OptionButton2, OptionButton3) ', OptionButton4, OptionButton5, OptionButton6....
  5.     Ar(2) = Array(TextBox1, TextBox2, TextBox3, TextBox4, TextBox5) ', TextBox6, TextBox7, TextBox8, TextBox9....
  6.    
  7.     'Join ¨ç¼Æ ¶Ç¦^¤@­Ó¦r¦ê¡A¸Ó¦r¦ê¬O³z¹L³sµ²¬Y­Ó(¤@ºû)°}¦C¤¤ªº¦h­Ó¤l¦r¦ê¦Ó«Ø¥ßªº¡C
  8.     If InStr(UCase(Join(Ar(1), "")), "TRUE") = 0 Or InStr(Join(Ar(2), ","), ",,") Then
  9.         MsgBox ("¸ê®Æ¥¼¿é¤J§¹¾ã¡A ¡y * ¡z ¥²¶·¿é¤J" & vbCrLf & _
  10.         "Data is not enter the full , ¡y * ¡z you must fill ")
  11.         Exit Sub
  12.     End If
  13.     ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  14.     Set Rng = Sheets("FMC Input Database").Range("a" & Rows.Count).End(xlUp).Offset(1)
  15.     With Rng  'ª«¥óRng : ©Ò«ü©wªºÀx¦s®æ©ÎÀx¦s®æ½d³ò¡C(¤£¥²²¾°Ê¤u§@­¶)
  16.         For i = 0 To UBound(Ar(1))
  17.             If Ar(1)(i).Value Then
  18.                 'Caption ÄÝ©Ê ¥X²{¦bª«¥ó¤Wªº­×¹¢¤å¦r , ¤@¯ë¥Î¨Ó¿ëÃѩδy­z¸Óª«¥ó
  19.                 .Value = Ar(1)(i).Caption
  20.                 Exit For
  21.                 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  22.             End If
  23.         Next
  24.         '.Range("B1")->³oRng ªº Àx¦s®æ©ÎÀx¦s®æ½d³ò¡C
  25.         .Range("B1").Resize(, UBound(Ar(2)) + 1) = Ar(2)
  26.         .Range("G1") = Now
  27.         ''''''''''''''''''''''''''''''''''''''''''''
  28.     End With
  29. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD