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

[µo°Ý] ¥Ñ©óMsgBox¤º®e¹Lªø·|Åã¥Ü²§±`¡A½Ð°Ý¦p¦ó±Nµ{¦¡§ï¼g¦¨UserFormªºTextBox?

[µo°Ý] ¥Ñ©óMsgBox¤º®e¹Lªø·|Åã¥Ü²§±`¡A½Ð°Ý¦p¦ó±Nµ{¦¡§ï¼g¦¨UserFormªºTextBox?

¥»©«³Ì«á¥Ñ av8d ©ó 2012-6-24 19:29 ½s¿è

¥Ñ©óMsgBox¤º®e¹Lªø·|Åã¥Ü²§±`¡AÅ¥»¡TextBox¬J¥i¥H©µ¦ù¤S¥i¥H½Æ»s¶K¡A½Ð°Ý¦p¦ó±Nµ{¦¡§ï¼g¦¨UserFormªºTextBoxµøµ¡?
  1. Sub Music()
  2.     Dim J1%, S1$, S2$
  3.     With ¤u§@ªí2.WindowsMediaPlayer1     '¥[¤JMediaPlayer¼½©ñ­µ¼Ö
  4.         .URL = "D:\¼Æ¦Ïºq.mp3"  '½Ð­×§ï­µ¼ÖÀÉ®×
  5.         .Visible = False
  6.         .Controls.stop
  7.     End With
  8.     For J1 = 4 To Sheets("Data").[A65536].End(xlUp).Row
  9.         If Range("A" & J1) <> "" And IsDate(Range("A" & J1)) Then
  10.         ''''''''''''''''''''''''''''''''''''''''''''''''
  11.             A1 = DateDiff("D", Date, Range("A" & J1))
  12.             If A1 >= 0 And A1 <= 15 Then S1 = "¥i©ó¡i" & (-1) * (A1) & "¤Ñ¡j«áú¶O" & "¡Aú¶Oª÷ÃB¬°¡i" & Sheets("Data").Range("C" & J1) & "¤¸¡j"
  13.             If A1 <= 10 Then S1 = "¥i©ó¡i" & (-1) * (A1) & "¤Ñ¡j«áú¶O" & "¡Aú¶Oª÷ÃB¬°¡i" & Sheets("Data").Range("C" & J1) & "¤¸¡j"
  14.             If A1 <= 5 Then S1 = "¥i©ó¡i" & (-1) * (A1) & "¤Ñ¡j«áú¶O" & "¡Aú¶Oª÷ÃB¬°¡i" & Sheets("Data").Range("C" & J1) & "¤¸¡j"
  15.             'If A1 < 0 Then S1 = "¤w¹L´Á" & (-1) * (A1) & "¤Ñ"
  16.             If S1 <> "" Then S2 = S2 & "±z¦³¤@µ§©ó¡i" & Sheets("Data").Range("A" & J1) & "¡j®ø¶Oªº¡i" & Sheets("Data").Range("D" & J1) & "¡j¶O¥Î¡A" & S1 & vbNewLine & vbNewLine
  17.             S1 = "": A1 = 0
  18.         '''''''''''''''''''''''''''''''''''''''''''
  19.         End If
  20.     Next
  21.     If S2 <> "" Then
  22.         With ¤u§@ªí2.WindowsMediaPlayer1     '¥[¤JMediaPlayer¼½©ñ­µ¼Ö
  23.             .URL = "D:\¼Æ¦Ïºq.mp3"  '½Ð­×§ï­µ¼ÖÀÉ®×
  24.             .Visible = False
  25.             .Controls.Play          '¼½©ñ­µ¼Ö
  26.           ''''''''''''''''''''''''''''''''''''
  27.             MsgBox S2
  28.             .Controls.stop          'Ãö³¬­µ¼Ö
  29.             '''''''''''''''''''''''''''''''''
  30.         End With
  31.     End If
  32. End Sub
½Æ»s¥N½X

¦^´_ 1# av8d


    MsgBox S2
    ¥Îuserform+textbox
     With UserForm1.TextBox1
            .Text = S2
            .WordWrap = True
            .Enabled = False
    End With
    UserForm1.Show

    ³o¼Ë´N¥i¥H¤F
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD