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

[µo°Ý] °õ¦æ«á¥X²{"°õ¦æ¶¥¬q¿ù»~'13':«¬ºA¤£²Å "°ÝÃD±Æ°£

[µo°Ý] °õ¦æ«á¥X²{"°õ¦æ¶¥¬q¿ù»~'13':«¬ºA¤£²Å "°ÝÃD±Æ°£

Userform ¸ÌªºComboBox 1,ÂI¿ï³æ¸¹«á·|¦Û°Ê±a¥XTextBox2~TextBox8ªº¸ê®Æ,¨Ã­pºâTextBox26¤ÎTextBox27¼Æ­È,¦AÂI¿ïOptionButton1«á¦Û°Ê­pºâ TextBox21¤Î TextBox22ªº­È«ö¤UCommandButton1«á ¸ê®Æ¦³¼g¤J§Ú­nªº¤u§@ªí¤º,¦ý·|¥X²{"°õ¦æ¶¥¬q¿ù»~'13':«¬ºA¤£²Å", §ä«Ü¤[,¤´¤£ª¾¹D°ÝÃD¬O¥X¦b­þ¸Ì? ½Ð°ª¤âÀ°¦£.

Private Sub ComboBox1_Change()
Dim flag As Boolean
Dim Rowcnt2, x2 As Integer
Dim first, second, user_price As Variant
      flag = False
      Rowcnt2 = Sheets("analysis").Cells(1, 1).CurrentRegion.Rows.Count
      For x2 = 1 To Rowcnt2
           If Sheets("analysis").Cells(x2, 1) = UserForm2.ComboBox1.Value Then
              TextBox2 = Sheets("analysis").Cells(x2, 2)
              TextBox5 = Sheets("analysis").Cells(x2, 7)
              TextBox6 = Sheets("analysis").Cells(x2, 4)
              TextBox3 = Sheets("analysis").Cells(x2, 5)
               TextBox4 = Sheets("analysis").Cells(x2, 6)
               TextBox7 = Sheets("analysis").Cells(x2, 8)
              TextBox8 = Sheets("analysis").Cells(x2, 9)
              flag = True
          End If
       Next
TextBox26.Value = TextBox8.Value - TextBox7.Value
TextBox27.Value = TextBox26.Value / TextBox8.Value
End Sub


Private Sub OptionButton1_Click()
Dim price_min, ratio, diff As Variant
If OptionButton1 = True Then
      If TextBox15.Value = "" And TextBox18.Value = "" Then

            price_min = TextBox12.Value
            ElseIf TextBox15.Value <> "" And TextBox18.Value = "" Then
           price_min = Application.Min(TextBox12.Value, TextBox15.Value)
        Else
          price_min = Application.Min(TextBox12.Value, TextBox15.Value, TextBox18.Value)
     End If
      diff = TextBox12.Value - price_min
      ratio = diff / TextBox7.Value
      TextBox21.Value= diff
      TextBox22.Value = ratio
       Else
     TextBox21.Text = ""
     TextBox22.Text = ""
     End If
End Sub
learner

¦^´_ 1# yliu
"°õ¦æ¶¥¬q¿ù»~'13':«¬ºA¤£²Å"
¶·¤W¶ÇÀɮ׬ݬݸê®Æ¤º®e
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¬ö¿ý¤u¨ã.zip (53.54 KB) ¦^´_ 2# GBKEE
³Â·ÐÀ°§Ú¬Ý¤@¤U.ÁÂÁÂ!
learner

TOP

¦^´_ 3# yliu


    ¬ö¿ý¤u¨ã.rar (41.53 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ yliu ©ó 2013-4-24 21:01 ½s¿è

¦^´_ 4# Hsieh


    ÁÂÁÂHsieh ¤j¤jªºÀ°¦£...
    °ÝÃD¤w¸Ñ¨M¤F,ÁÂÁ¡I¡I
learner

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD