Private Sub Commandl_Click()
Dim x As Integer, y As Integer
x =12: y= 32 Call Proc(x,y) End Sub
Public Sub Proc{h As Integer, ByVal m As Integer} n= n Mod 10 m= m Mod 10
End Sub
´ò¿ª´°ÌåÔËÐк󣬵¥»÷ÃüÁî°´Å¥£¬Á¢¼´´°¿ÚÉÏÊä³öµÄ½á¹ûÊÇ£¨ A£©2 32 C£©2 2
Private Sub Commandl_Click( )
Dim dl As Date Dim d2 As Date dl = #12/25/2009# d2 = #1/5/2010#
MsgBox DateDiff(\
End Sub
´ò¿ª´°ÌåÔËÐк󣬵¥»÷ÃüÁî°´Å¥£¬Á¢¼´´°¿ÚÉÏÊä³öµÄ½á¹ûÊÇ£¨ A£©1 B£©2 C£©10 D£©11
£¨35£©ÏÂÁгÌÐò¶ÎµÄ¹¦ÄÜÊÇʵÏÖ¡°Ñ§Éú¡±±íÖС°ÄêÁ䡱×Ö¶ÎÖµ¼Ó 1
Dim Str As String
Str=\Docmd. RunSQL Str
¿Õ°×´¦Ó¦ÌîÈëµÄ³ÌÐò´úÂëÊÇ£¨
£©¡£
£©¡£
B£©12 3 D£©12 32
£©¡£
£¨34£©ÔÚ´°ÌåÉÏÓÐÒ»¸öÃüÁî°´Å¥ Commandl£¬±àдʼþ´úÂëÈçÏ£º
B£©Update ѧÉú Set ÄêÁä=ÄêÁä+1 D£©Edit ѧÉú Set ÄêÁä=ÄêÁä+1
A£©ÄêÁä=ÄêÁä+1 C£©Set ÄêÁä=ÄêÁä+1
¶þ¡¢Ìî¿ÕÌ⣨ÿ¿Õ 2 ·Ö£¬¹² 30 ·Ö£©
£¨1£©Ò»¸ö¶ÓÁеijõʼ״̬Ϊ¿Õ¡£ÏÖ½«ÔªËØA,B,C,D,E,F,5,4,3,2,1 ÒÀ´ÎÈë¶Ó£¬È»ºóÔÙÒÀ´ÎÍ˶ӣ¬
ÔòÔªËØÍ˶ӵÄ˳ÐòΪ ¡¾1¡¿ ¡£ £¨2£©Éèijѻ·¶ÓÁеÄÈÝÁ¿Îª 50£¬Èç¹ûÍ·Ö¸Õëfront=-45£¨Ö¸Ïò¶ÓÍ·ÔªËصÄǰһλÖã©£¬Î²Ö¸Õërear=l0
£¨Ö¸Ïò¶ÓβԪËØ£©£¬Ôò¸ÃÑ»·¶ÓÁÐÖй²ÓÐ ¡¾2¡¿ ¸öÔªËØ¡£ £¨3£©Éè¶þ²æÊ÷ÈçÏ£º
B F D A C
E G H 2010 Äê 3 Ô±ÊÊÔÕæ¾í¼°´ð°¸Ïê½â µÚ 5 Ò³£¨¹² 12 Ò³£©
¶Ô¸Ã¶þ²æÊ÷½øÐкóÐò±éÀúµÄ½á¹ûΪ ¡¾3¡¿ ¡£ £¨4£©Èí¼þÊÇ ¡¾4¡¿ ¡¢Êý¾ÝºÍÎĵµµÄ¼¯ºÏ¡£
£¨5£©ÓÐÒ»¸öѧÉúÑ¡¿ÎµÄ¹Øϵ£¬ÆäÖÐѧÉúµÄ¹ØϵģʽΪ£ºÑ§Éú(ѧºÅ,ÐÕÃû,°à¼¶,ÄêÁä)£¬
¿Î³ÌµÄ¹ØϵģʽΪ£º¿Î³Ì(¿ÎºÅ,¿Î³ÌÃû,ѧʱ)£¬ÆäÖÐÁ½¸ö¹ØϵģʽµÄ¼ü·Ö±ðÊÇѧºÅºÍ¿ÎºÅ£¬ Ôò¹Øϵģʽѡ¿Î¿É¶¨ÒåΪ£ºÑ¡¿Î(ѧºÅ, ¡¾5¡¿ ,³É¼¨)¡£
£¨6£©ÏÂͼËùʾµÄ´°ÌåÉÏÓÐÒ»¸öÃüÁî°´Å¥£¨Ãû³ÆΪCommandl£©ºÍÒ»¸öÑ¡Ïî×飨Ãû³ÆΪFramel£©£¬
Ñ¡Ïî×éÉÏÏÔʾ¡°Framel¡±Îı¾µÄ±êÇ©¿Ø¼þÃû³ÆΪLabell£¬Èô½«Ñ¡Ïî×éÉÏÏÔʾÎı¾¡°£Æramel¡± ¸ÄΪºº×Ö¡°ÐԱ𡱣¬Ó¦Ê¹ÓõÄÓï¾äÊÇ ¡¾6¡¿ ¡£
£¨7£©ÔÚµ±Ç°´°ÌåÉÏ£¬ÈôҪʵÏÖ½«½¹µãÒƶ¯µ½Ö¸¶¨¿Ø¼þ£¬Ó¦Ê¹Óõĺê²Ù×÷ÃüÁîÊÇ ¡¾7¡¿ ¡£ £¨8£©Ê¹ÓÃÏòµ¼´´½¨Êý¾Ý·ÃÎÊҳʱ£¬ÔÚÈ·¶¨·Ö×鼶±ð²½ÖèÖÐ×î¶à¿ÉÉèÖà ¡¾8¡¿ ¸ö·Ö×é×ֶΠ£¨9£©ÔÚ´°ÌåÎı¾¿òTextlÖÐÊäÈë¡°456AbC¡±ºó£¬Á¢¼´´°¿ÚÉÏÊä³öµÄ½á¹ûÊÇ ¡¾9¡¿ ¡£
Private Sub Text1_KeyPress{KeyAscii As Integer}
Select Case KeyAscii Case 97 To 122
Debug.Print Ucase(Chr (KeyAscii)); Case 65 To 90
Debug. Print Lcase(Chr (KeyAscii)); Case 48 to 57
Debug.Print Chr(keyAscii); Case Else KeyAscii =0 End Select End Sub
Private Sub Commandl_Click( )
Dim a (10) ,p (3) As Integer K=5 For i=1 To 10
a(i) = i *i Next i
For i=1 To 3 K=k+p(i) = a(i *i) Next i
For i=1 To 3
2010 Äê 3 Ô±ÊÊÔÕæ¾í¼°´ð°¸Ïê½â µÚ 6 Ò³£¨¹² 12 Ò³£©
£¨10£©ÔÚ´°ÌåÉÏÓÐÒ»¸öÃüÁî°´Å¥ Commandl£¬±àдʼþ´úÂëÈçÏ£º
K= k+p(i)*2 Next i MsgBox k End Sub
´ò¿ª´°ÌåÔËÐк󣬵¥»÷ÃüÁî°´Å¥£¬ÏûÏ¢¿òÖÐÊä³öµÄ½á¹ûÊÇ ¡¾10¡¿ ¡£
£¨11£©ÏÂÁгÌÐòµÄ¹¦ÄÜÊÇÕÒ³ö±» 5¡¢7 ³ý£¬ÓàÊýΪ 1 µÄ×îСµÄ 5 ¸öÕýÕûÊý¡£ÇëÔÚ³ÌÐò¿Õ°×´¦ÌîÈë
Êʵ±µÄÓï¾ä£¬Ê¹³ÌÐò¿ÉÒÔÍê³ÉÖ¸¶¨µÄ¹¦ÄÜ¡£
Private Sub Commandl_Click( ) Dim Ncount% ,n% Ncount =0
n=1 Do n=n+1 If
¡¾11¡¿ Then Debug. Print n Ncount = Ncount+1 End If
Loop Until Ncount End Sub
£¨12£©ÒÔϳÌÐòµÄ¹¦ÄÜÊÇÔÚÁ¢¼´´°¿ÚÖÐÊä³ö 100 µ½ 200 Ö®¼äËùÓеÄËØÊý£¬²¢Í³¼ÆÊä³öËØÊýµÄ¸ö
Êý¡£ÇëÔÚ³ÌÐò¿Õ°×´¦ÌîÈëÊʵ±µÄÓï¾ä£¬Ê¹³ÌÐò¿ÉÒÔÍê³ÉÖ¸¶¨µÄ¹¦ÄÜ¡£
Private Sub Commandl_Click( )
Dim i% ,j%,k%,t% 't Ϊͳ¼ÆËØÊýµÄ¸öÊý Dim b As Boolean For i= 100 To 200
b=True k=2 j=Int(Sqr(i)) Do While k<=j And b If i Mod k = 0 Then b = ¡¾12¡¿ End If K= ¡¾13¡¿ Loop
If b = True Then
b = t+1 Debug.Print i End If Next i
Debug.Print \End Sub
2010 Äê 3 Ô±ÊÊÔÕæ¾í¼°´ð°¸Ïê½â µÚ 7 Ò³£¨¹² 12 Ò³£©
£¨13£©Êý¾Ý¿âÖÐÓй¤×Ê±í£¬°üÀ¨¡°ÐÕÃû¡±¡¢¡°¹¤×Ê¡±ºÍ¡°Ö°³Æ¡±µÈ×ֶΣ¬»¹Òª¶Ô²»Í¬Ö°³ÆµÄÖ°¹¤
Ôö¼Ó¹¤×Ê£¬¹æ¶¨½ÌÊÚÖ°³ÆÔö¼Ó 15%£¬¸±½ÌÊÚÖ°³ÆÔö¼Ó 10%£¬ÆäËûÈËÔ±Ôö¼Ó 5%£¬ÏÂÁÐ³Ì ÐòµÄ¹¦ÄÜÊÇ°´ÕÕÉÏÊö¹æ¶¨µ÷Õûÿλְ¹¤µÄ¹¤×Ê£¬²¢ÏÔʾËùÕǹ¤×ʵÄ×ܺͣ¬ÇëÔÚ¿Õ°×´¦Ìî ÈëÊʵ±µÄÓï¾ä£¬Ê¹³ÌÐò¿ÉÒÔÍê³ÉÖ¸¶¨µÄ¹¦ÄÜ¡£
Private Sub Command5_Click( )
Dim ws As DAO. Workspace Dim db As DAO. Database Dim db As DAO.Recordset Dim gz As DAO.Field Dim zc As DAO .Field Dim sum As Currency Dim rate As Single Set db = CurrentDb( )
Set rs = db.OpenRecordset(\¹¤×ʱí\Set gz = rs.Fields(\¹¤×Ê\Set zc = rs.Fields(\Ö°³Æ\Sum =0 Do While Not
rs.Edit Select Case zc Case Is =\½ÌÊÚ\
rate =0.15 Case Is =\¸±½ÌÊÚ\
rate =0.1 Case Else
rate =0.05
End Select sum=sum+ gz*rate
¡¾14¡¿
gz=gz+gz*rate ¡¾15¡¿ rs.MoveNext Loop rs. Close db.Close Set rs = Nothing Set db = Nothing
MsgBox \Õǹ¤×Ê×ܼÆ:\End Sub
2010 Äê 3 Ô±ÊÊÔÕæ¾í¼°´ð°¸Ïê½â µÚ 8 Ò³£¨¹² 12 Ò³£©