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

vba½G¨­,·P®¦

vba½G¨­,·P®¦

Private Sub CommandButton1_Click()
Sheets("¤u§@ªí3").Select
Label25 = [B7]
'Sheets("¤u§@ªí3").Select
If [J11] = 1 Then
    OptionButton1 = False
    OptionButton2 = False
    OptionButton3 = False
    OptionButton4 = True
ElseIf [I11] = 1 Then
   OptionButton1 = False
    OptionButton2 = False
    OptionButton3 = True
    OptionButton4 = False
ElseIf [H11] = 1 Then
     OptionButton1 = False
    OptionButton2 = True
    OptionButton3 = False
    OptionButton4 = False
ElseIf [G11] = 1 Then
   
    OptionButton1 = True
    OptionButton2 = False
    OptionButton3 = False
    OptionButton4 = False
End If

Sheets("¤u§@ªí1").Select

TextBox4 = Round(TextBox1 * 3.3, 0)
Me.TextBox4 = Format(TextBox4, "#,###.##")
TextBox5 = Round(TextBox2 * 3.3, 0)
Me.TextBox5 = Format(TextBox5, "#,###.##")
If TextBox6 < 0 Then
TextBox6 = 0
Else
TextBox6 = Round(TextBox4 / TextBox5, 2)
Me.TextBox6 = Format(TextBox6, "#,###.##")
End If


Private Sub TextBox15_Change()
    Sheets("¤u§@ªí3").Select
    [C3] = TextBox15
    Sheets("¤u§@ªí1").Select
      
   
End Sub

Private Sub TextBox16_Change()
Sheets("¤u§@ªí3").Select
[C4] = TextBox16
Sheets("¤u§@ªí1").Select
End Sub

Private Sub TextBox17_Change()
Sheets("¤u§@ªí3").Select
    [C5] = TextBox17
Sheets("¤u§@ªí1").Select
End Sub

¦^´_ 12# GBKEE


    ÁÂÁÂG¤jªº¦^ÂÐ..

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-2-14 15:38 ½s¿è

¦^´_ 11# sillykin
ªÅ¥Õªºªí³æ¼Ò²Õµ{¦¡½X
  1. Option Explicit
  2. Dim xAr(), xClass() As New OP_Class
  3. Private Sub UserForm_Initialize()
  4.      Dim xLeft As Integer, xTop As Integer, i As Integer, Form_Height As Integer, Form_Width As Integer
  5.      Dim OB As Object
  6.      xAr = Array("°ê¨¾¨Æ·~", "ĵ¹î³æ¦ì", "¨ä¥L¤½¦@¦æ¬FÃþ", "±Ð¨|Ãþ", "¾Ç¥Í", "¤u¡B°Ó¤ÎªA°ÈÃþ", "¹AªLº®ªªÃþ", "AAA", "BBBB", "CCCC", "DDDDD", "EEE")
  7.      'xAr ¤]¥i¥H¬O¤u§@ªí¤W³æÄæ©Î³æ¦Cªº½d³ò
  8.      ReDim xClass(1 To UBound(xAr) + 1)
  9.      xLeft = 10: xTop = 10
  10.      For i = 1 To UBound(xAr) + 1
  11.         Set OB = Controls.Add("Forms.OptionButton.1", "OptionButton" & i)
  12.         
  13.         Set xClass(i).Op = OB
  14.         With OB
  15.             .Caption = xAr(i - 1)
  16.             .Tag = i
  17.             .Left = xLeft
  18.             .Top = xTop
  19.             .Width = 150
  20.             .Height = 20
  21.             If i Mod 10 Then
  22.                  xTop = xTop + 10 + .Height
  23.                  Form_Height = IIf(Form_Height < xTop, xTop + 10 + .Height * 2, Form_Height)
  24.             Else
  25.                 xTop = 10
  26.                 xLeft = xLeft + 10 * 2 + .Width
  27.                 Form_Width = IIf(Form_Width < xLeft, Form_Width + xLeft + .Width, Form_Width)
  28.             End If
  29.         End With
  30.      Next
  31.      '½Õ¾ãFormªº°ª«×,¼e«×
  32.      Height = Form_Height
  33.      Width = Form_Width
  34. End Sub
½Æ»s¥N½X
ª«¥ó¼Ò²Õªºµ{¦¡½X
  1. Option Explicit
  2. Public WithEvents Op As MSForms.OptionButton
  3. Private Sub Op_Click()
  4.     'OptionButton
  5.     With Op
  6.         MsgBox .Name & vbLf & .Caption
  7.         [B58] = .Tag
  8.         [C58] = .Caption
  9.         Unload .Parent
  10.     End With
  11.     UserForm40.Show
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 10# sillykin

¤£¦n·N«ä..·Q¦b½Ð°Ývba½G¨­

Private Sub OptionButton1_Click()
If OptionButton1 = True Then
[B58].VALUE = 1
[C58] = "°ê¨¾¨Æ·~"
End If
Unload Me
UserForm40.Show

End Sub

Private Sub OptionButton2_Click()
If OptionButton2 = True Then
[B58].Value = 2
[C58] = "ĵ¹î³æ¦ì"
End If
Unload Me
UserForm40.Show

End Sub

Private Sub OptionButton3_Click()
If OptionButton3 = True Then
[B58].Value = 3
[C58] = "¨ä¥L¤½¦@¦æ¬FÃþ"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton4_Click()
If OptionButton4 = True Then
[B58].Value = 4
[C58] = "±Ð¨|Ãþ"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton5_Click()
If OptionButton5 = True Then
[B58].Value = 5
[C58] = "¾Ç¥Í"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton6_Click()
If OptionButton6 = True Then
[B58].Value = 6
[C58] = "¤u¡B°Ó¤ÎªA°ÈÃþ"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton7_Click()
If OptionButton7 = True Then
[B58].Value = 7
[C58] = "¹AªLº®ªªÃþ"
End If
Unload Me
UserForm40.Show
End Sub

Private Sub OptionButton8_Click()
If OptionButton8 = True Then
[B58].Value = 8
[C58] = "Äq¥Û¤Î¤g¥Û±Ä¨ú·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton9_Click()
If OptionButton9 = True Then
[B58].Value = 9
[C58] = "»s³y·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton10_Click()
If OptionButton10 = True Then
[B58].Value = 10
[C58] = "¤ô¹q¿U®ð·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton11_Click()
If OptionButton11 = True Then
[B58].Value = 11
[C58] = "Àç³y·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton12_Click()
If OptionButton12 = True Then
[B58].Value = 12
[C58] = "§åµo¤Î¹s°â·~"
End If
Unload Me
UserForm40.Show
End Sub
Private Sub OptionButton13_Click()
If OptionButton13 = True Then
[B58].Value = 13
[C58] = "¦í±J¤ÎÀ\¶¼·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton14_Click()
If OptionButton14 = True Then
[B58].Value = 14
[C58] = "¹B¿é¡B­ÜÀx¤Î³q«H·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton15_Click()
If OptionButton15 = True Then
[B58].Value = 15
[C58] = "ª÷¿Ä¤Î«OÀI·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton16_Click()
If OptionButton16 = True Then
[B58].Value = 16
[C58] = "¤£°Ê²£¤Î¯²¸î·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton17_Click()
If OptionButton17 = True Then
[B58].Value = 17
[C58] = "±M·~ªA°È·~"
End If
Unload Me
UserForm40.Show
End Sub
Private Sub OptionButton18_Click()
If OptionButton18 = True Then
[B58].Value = 18
[C58] = "§Þ³NªA°È·~"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton19_Click()
If OptionButton19 = True Then
[B58].Value = 19
[C58] = "µL·~¡B®aºÞ¡B°h¥ð¤H­ûµ¥"
End If
Unload Me
UserForm40.Show
End Sub


Private Sub OptionButton20_Click()
If OptionButton20 = True Then
[B58].Value = 20
[C58] = "¤£°Ê«Dªk¤H²Õ´±Â«H¤á­t³d¤H"
End If
Unload Me
UserForm40.Show
End Sub
'===============================================================================





Private Sub UserForm_Click()

End Sub

TOP

¦^´_ 9# Joforn


    ÁÂÁ¤j¤j¤§¦^ÂÐ,¦ýÁÙ¬O¥|±Ë¤­¤J¦]¯À,³y¦¨­pºâ¤§»È»~,

TOP

¦^´_ 7# sillykin
¤]¥i¥H¨Ï¥Î¤U­±ªº¡G
FormatNumber([B3], 0)

TOP

¥»©«³Ì«á¥Ñ Joforn ©ó 2015-9-10 12:42 ½s¿è

¦^´_ 7# sillykin
Format$([B1] * 0.33, "#,##0")¡@'这个会«O¯d0¡A¤£«O¯d0ªº话§ï¦¨Format$([B1] * 0.33, "#,###")

TOP

¦pªG¥Î¤U­±¨ç¼Æ­pºâ
=TEXT(B1*3.3,"#,###")
vba­n¦p¦ó¤U©O???

TOP

¦^´_ 5# sillykin

¤j¤j¤£¦n·N«ä..¦b½Ð±Ð¤@¤U
Private Sub CommandButton3_Click()
Dim t As Integer, v1 As Integer

For t = 1 To 17


Range("C" & t + 3).Value = FormatNumber(Round(Range("A" & t + 3).Value * 3.3, 1))
Range("D" & t + 3).Value = FormatNumber(Round(Range("B" & t + 3).Value * 3.3, 1))
If Range("D" & t + 3) <> 0 Then
  Range("E" & t + 3) = FormatNumber(Round(Range("C" & t + 3) / Range("D" & t + 3), 2))
  Else
  Range("E" & t + 3).Value = ""
  End If
  
'================================================================================
   '20¦~¥H¤U
    If Range("A" & t + 3) = "" Then
        Range(("C" & t + 3), ("E" & t + 3)) = ""
      
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("F" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.4) - (Range("D" & t + 3) * 0.7), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("F" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.3) - (Range("D" & t + 3) * 0.4), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("F" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
    ElseIf (Range("E" & t + 3) <= 1) Then
         Range("F" & t + 3) = 0
    End If
   
   
'================================================================================
   '¹O20~30¦~
    If Range("A" & t + 3) = "" Then
         Range(("C" & t + 3), ("E" & t + 3)) = ""
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("G" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.36) - (Range("D" & t + 3) * 0.6), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("G" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.28) - (Range("D" & t + 3) * 0.36), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("G" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
     ElseIf (Range("E" & t + 3) <= 1) Then
         Range("G" & t + 3) = 0
    End If
  
'================================================================================
   '¹O30~40¦~
    If Range("A" & t + 3) = "" Then
        Range(("C" & t + 3), ("E" & t + 3)) = ""
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("H" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.34) - (Range("D" & t + 3) * 0.55), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("H" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.27) - (Range("D" & t + 3) * 0.34), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("H" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
     ElseIf (Range("E" & t + 3) <= 1) Then
         Range("H" & t + 3) = 0
    End If
'================================================================================
   '¹O40¦~¥H¤W
    If Range("A" & t + 3) = "" Then
         Range(("C" & t + 3), ("E" & t + 3)) = ""
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("I" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.32) - (Range("D" & t + 3) * 0.5), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("I" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.26) - (Range("D" & t + 3) * 0.32), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("I" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
     ElseIf (Range("E" & t + 3) <= 1) Then
         Range("I" & t + 3) = 0
    End If
   
   
'================================================================================
   '¼W­Èµ|Á`­p
    If Range("J" & t + 3) = "" Then
         Range(("K" & t + 3)) = ""
        Else
         Range("K" & t + 3) = FormatNumber(Round((Range("F" & t + 3)) * (Range("J" & t + 3)), 1))
         Range("L" & t + 3) = FormatNumber(Round((Range("G" & t + 3)) * (Range("J" & t + 3)), 1))
         Range("M" & t + 3) = FormatNumber(Round((Range("H" & t + 3)) * (Range("J" & t + 3)), 1))
         Range("N" & t + 3) = FormatNumber(Round((Range("I" & t + 3)) * (Range("J" & t + 3)), 1))
         
    End If
   
Next

End Sub
¬°¦ó¦b
A4Àx¦s®æ¿é¤J181,000
B4Àx¦s®æ¿é¤J140,625
--------------------
C4Àx¦s®æµª®×¬°597,300
D4Àx¦s®æµª®×¬°464,062¡]¥¿½T¬°464,063¡^
F4Àx¦s®æµª®×¬°26,648¡]¥¿½T¬°26,647¡^
¤£ª¾­n¦p¦ó³B¸m¡A¦³°ª¤â¨ó§U¶Ü¡H¡H¡H

TOP

ÁÂÁ¤j¤jªº«ü¾É¡A·P®¦

TOP

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD