ExcelTip.Net留存知识帖 ---【注:附件之前被网盘供应商清空后,现已修复-现已修复-现已修复为本地下载!】
现在位置:首页 > 我的测验 > 操作与技巧 > 【罗刚君VBA免费课作业题】之第11课作业

【罗刚君VBA免费课作业题】之第11课作业

作者:绿色风 分类: 时间:2022-08-18 浏览:185
楼主
罗刚君
提示:此题目是“VBA入门免费教学群”(群号:30729794)的课后作业
请未参与听课者绕道,谢谢配合。


1.把以下代码缩进对齐:
Sub test()
With Worksheets("总表")
If .Range("A:A").ColumnWidth > 50 Then
.Range("A:A").ColumnWidth = 50
Else
.Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
.Range("A:A").Clear
End If
End With
Select Case Day(Date)
Case Is <= 10
MsgBox "上旬"
Case Is <= 20
MsgBox "中旬"
Case Else
MsgBox "下旬"
End Select
End Sub
2.将以下代码书写成三行,但是功能不变。
  1. MsgBox "中华人民共和国 尼日利亚 古巴"
3.修改以下代码,将53改写为常量形式,不用数值。
  1. Sub ABC()
  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), 53
  3. End Sub

 
4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
  1. MsgBox Range("IV3").End(1).Column
_____________________________________________________
补充:“VBA入门免费教学群”(群号:30729794)每周三上课一次,有兴趣者皆可报名,永远免费。
请提交作业时注明在免费听课群的昵称。三次不交作业者,将踢出群,让出空间让更多的人进来听课,请大家配合。
2楼
kcxs
客城小生作业
第1题:
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.             MsgBox "上旬"
  13.         Case Is <= 20
  14.             MsgBox "中旬"
  15.         Case Else
  16.             MsgBox "下旬"
  17.     End Select
  18. End Sub
第2题:
  1. MsgBox "中华人民共和国 " _
  2. & "尼日利亚 " _
  3. & "古巴 "
第3题:
  1. Sub ABC()
  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
  3. End Sub
第4题:
  1. MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
3楼
wendel
1、
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.             MsgBox "上旬"
  13.         Case Is <= 20
  14.             MsgBox "中旬"
  15.         Case Else
  16.             MsgBox "下旬"
  17.     End Select
  18. End Sub
2、
  1.     MsgBox "中华人民共和国" _
  2.     & " 尼日利亚" _
  3.     & " 古巴"
3、
  1. Sub ABC()
  2.      MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbCritical + vbQuestion
  3. End Sub
4、
  1. MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
4楼
雁过无痕
MsgBox "中华人民共和国" -& "尼日利亚" -& "古巴"
5楼
雁过无痕
Sub test()
  With Worksheets("总表")
    If .Range("A:A").ColumnWidth > 50 Then
      .Range("A:A").ColumnWidth = 50
    Else
      .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
      .Range("A:A").Clear
    End If
  End With
  Select Case Day(Date)
    Case Is <= 10
      MsgBox "上旬"
    Case Is <= 20
      MsgBox "中旬"
    Case Else
      MsgBox "下旬"
  End Select
End Sub
6楼
雁过无痕
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel+vbExc**tion
End Sub
7楼
hunt
hehex 第11 课作业
  1. Sub 第2题()
  2.     MsgBox "中华人民共和国" & _
  3.          " 尼日利亚" & _
  4.          "  古巴 "

  5. End Sub
  6. Sub 第1题()

  7.     With Worksheets("总表")

  8.         If .Range("A:A").ColumnWidth > 50 Then

  9.             .Range("A:A").ColumnWidth = 50

  10.         Else

  11.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5

  12.             .Range("A:A").Clear

  13.         End If

  14.     End With

  15.     Select Case Day(Date)

  16.     Case Is <= 10

  17.         MsgBox "上旬"

  18.     Case Is <= 20

  19.         MsgBox "中旬"

  20.     Case Else

  21.         MsgBox "下旬"

  22.     End Select

  23. End Sub
  24. Sub 第3题()

  25.     MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel

  26. End Sub
  27. Sub 第4题()
  28.    
  29.    
  30.     MsgBox Cells(3, Columns.Count).End(1).Column
  31.    


  32. End Sub
8楼
xinjiangrende
问题1 :
Sub test()
      With Worksheets("总表")
           If .Range("A:A").ColumnWidth > 50 Then
           .Range("A:A").ColumnWidth = 50
      Else
           .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
           .Range("A:A").Clear
       End If
      End With
      Select Case Day(Date)
            Case Is <= 10
            MsgBox "上旬"
            Case Is <= 20
            MsgBox "中旬"
           Case Else
           MsgBox "下旬"
          End Select
    End Sub

问题2
MsgBox "中华人民共和国“ _
   & " 尼日利亚" _
   &" 古巴"

问题3 :
  Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"),Vbretycancel
End Sub

问题4
MsgBox Range("IV3").End(1).Colum

msgBox cells(rows.Count,1)
Range ("IV" & Rows.Count)

9楼
xinjiangrende
我是土豆丝,群里的
10楼
connew3230
20130410.rar


VBA入门免费教学群


群   号:30729794

群呢称:深圳
11楼
Erik_16888
364646658 笑看江湖
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.     Case Is <= 10
  12.         MsgBox "上旬"
  13.     Case Is <= 20
  14.         MsgBox "中旬"
  15.     Case Else
  16.         MsgBox "下旬"
  17.     End Select
  18. End Sub
第2题
  1. MsgBox "中华人民共和国" _
  2. & " 尼日利亚" & _
  3.   " 古巴"
第3题
  1. Sub ABC()
  2.     MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel
  3.     End Sub
第四题
  1. MsgBox Range("iv3").End(xlToLeft).Column
12楼
夜不寐
  1. Sub test()
  2. With Worksheets("总表")
  3.     If .Range("A:A").ColumnWidth > 50 Then
  4.         .Range("A:A").ColumnWidth = 50
  5.     Else
  6.         .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.         .Range("A:A").Clear
  8.     End If
  9. End With
  10. Select Case Day(Date)
  11.     Case Is <= 10
  12.         MsgBox "上旬"
  13.     Case Is <= 20
  14.         MsgBox "中旬"
  15.     Case Else
  16.         MsgBox "下旬"
  17. End Select
  18. End Sub
QQ昵称:夜不寐
13楼
啈冨□專属
1、
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.             MsgBox "上旬"
  13.         Case Is <= 20
  14.             MsgBox "中旬"
  15.         Case Else
  16.             MsgBox "下旬"
  17.     End Select
  18. End Sub
2、
  1. MsgBox "中华人民共和国" _
  2.         & "尼日利亚" _
  3.         & "古巴 "
  4.         
3、
  1. Sub ABC()
  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel
  3. End Sub
4、


14楼
爱情和面包
MsgBox "中华人民共和国"
&_"尼日利亚"
&_"古巴"

30729794  爱情和面包
15楼
ynzsvt
我缩进一格的。我喜欢只缩进一格。
第十一课.zip
16楼
chenshujuan
交作业了,最后一题不会
4-10作业.zip
17楼
ff8shi
          石头作业:

第一题:
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.     Case Is <= 10
  12.         MsgBox "上旬"
  13.     Case Is <= 20
  14.         MsgBox "中旬"
  15.     Case Else
  16.         MsgBox "下旬"
  17.     End Select
  18. End Sub
第二题:
  1. Sub tt()
  2.     MsgBox "中华人民共和国" _
  3.          & "尼日利亚" _
  4.          & "古巴 "
第三题:
  1. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel
第四题:

  1.     MsgBox Cells(3, "IV").End(1).Column
18楼
夜不寐
  1. MsgBox "中华人民共和国" _
  2.     & " 尼日利亚" _
  3.     & " 古巴"
  1. Sub ABC()
  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
  3. End Sub
  1. MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
19楼
manuel442
1、
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.         .Range("A:A").ColumnWidth = 50
  5.         Else
  6.         .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.         .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.         MsgBox "上旬"
  13.         Case Is <= 20
  14.         MsgBox "中旬"
  15.         Case Else
  16.         MsgBox "下旬"
  17.     End Select
  18. End Sub
2、
  1. MsgBox "中华人民共和国" & _
  2.            " 尼日利亚" & _
  3.            " 古巴"
3、
  1. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
4、
  1. MsgBox Range("iv3").End(xlToLeft).Column
20楼
闻启学
四维-佛山-天涯(蚊子)
我交作业了
  1. Sub lianxi001()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.     Case Is <= 10
  12.         MsgBox "上旬"
  13.     Case Is <= 20
  14.         MsgBox "中旬"
  15.     Case Else
  16.         MsgBox "下旬"
  17.     End Select
  18. End Sub


  19. Sub lixi002()

  20.     MsgBox "中华人民共和国" & _
  21.            "尼日利亚" & _
  22.            "古巴"

  23. End Sub


  24. Sub lianxi003()
  25.     MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel + vbDefaultButton1
  26. End Sub


  27. Sub lianxi004()

  28. MsgBox ActiveSheet.Cells(3, Columns.Count).End(xlToLeft).Column
  29. End Sub
21楼
杭州小菜02
1.Sub test()
With Worksheets("总表")
If .Range("A:A").ColumnWidth > 50 Then
    .Range("A:A").ColumnWidth = 50
Else
    .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
    .Range("A:A").Clear
End If
End With
Select Case Day(Date)
    Case Is <= 10
    MsgBox "上旬"
    Case Is <= 20
    MsgBox "中旬"
    Case Else
    MsgBox "下旬"
End Select
End Sub
2.MsgBox "中华人民共和国" & _
              "尼日利亚" & _
               "古巴"
3.
Sub ABC()
MsgBox Format(Date, "aaaa,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
4.
MsgBox Cells(3, "iv").End(xlDown).Column
22楼
杭州小菜02
1.Sub test()
With Worksheets("总表")
If .Range("A:A").ColumnWidth > 50 Then
    .Range("A:A").ColumnWidth = 50
Else
    .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
    .Range("A:A").Clear
End If
End With
Select Case Day(Date)
    Case Is <= 10
    MsgBox "上旬"
    Case Is <= 20
    MsgBox "中旬"
    Case Else
    MsgBox "下旬"
End Select
End Sub
2.MsgBox "中华人民共和国" & _
              "尼日利亚" & _
               "古巴"
3.
Sub ABC()
MsgBox Format(Date, "aaaa,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
4.
MsgBox Cells(3, "iv").End(xlDown).Column
23楼
一片叶子
@小鱼
1.Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
            Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
        Select Case Day(Date)
            Case Is <= 10
            MsgBox "上旬"
            Case Is <= 20
            MsgBox "中旬"
            Case Else
            MsgBox "下旬"
        End Select
End Sub
2.Sub test1()
    MsgBox "中华人民共和国" _
           & "尼日利亚" _
           & "古巴"
End Sub
3.Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel
End Sub
4.Sub test2()
'    MsgBox Range("IV3").End(1).Colum
     MsgBox Cells(, Columns.Count).End(xlUp).Column
End Sub
24楼
一片叶子
@小鱼
1.Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
            Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
        Select Case Day(Date)
            Case Is <= 10
            MsgBox "上旬"
            Case Is <= 20
            MsgBox "中旬"
            Case Else
            MsgBox "下旬"
        End Select
End Sub
2.Sub test1()
    MsgBox "中华人民共和国" _
           & "尼日利亚" _
           & "古巴"
End Sub
3.Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel
End Sub
4.Sub test2()
'    MsgBox Range("IV3").End(1).Colum
     MsgBox Cells(, Columns.Count).End(xlUp).Column
End Sub
25楼
一片叶子
111111111111我电脑出问题了
26楼
善待生活
嘿嘿,,最后这题不会做,希望下次能学会。谢谢老师
第11课云南-善待生活 作业.rar
27楼
amylee
漠沙如雪2013,提交第十一课作业,请指正!
第十一课作业.rar
28楼
辛宝
提交作业!谢谢~~


1.把以下代码缩进对齐后如下:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
        MsgBox "上旬"
        Case Is <= 20
        MsgBox "中旬"
        Case Else
        MsgBox "下旬"
End Select


2.将以下代码书写成三行后,但是功能不变。

   MsgBox "中华人民共和国 " _
   & "尼日利亚 " _
   & "古巴"


3.修改以下代码,将53改写为常量形式,不用数值。
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel
End Sub

 


4.修改以下代码后,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
MsgBox cells(3,Columns.Count).End(xlToLeft).Column
29楼
Crazywu
湖北-Craywu    2013.4.10
****************************************************************************
1. 代码缩进
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
            Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
            MsgBox "上旬"
        Case Is <= 20
            MsgBox "中旬"
        Case Else
            MsgBox "下旬"
    End Select
End Sub


2. 代码换行
MsgBox "中华人民共和国 " _
  & "尼日利亚 " _
  & "古巴"


3. 常量形式
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub


4. 兼容性
Sub test1()
    MsgBox Range("IV" & 3).End(1).Column
End Sub
30楼
小志就是我了
吉林-悟
1.把以下代码缩进对齐:
Sub test()
With Worksheets("总表")
    If .Range("A:A").ColumnWidth > 50 Then
        .Range("A:A").ColumnWidth = 50
    Else
        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
        .Range("A:A").Clear
    End If
End With
Select Case Day(Date)
    Case Is <= 10
        MsgBox "上旬"
    Case Is <= 20
        MsgBox "中旬"
    Case Else
        MsgBox "下旬"
End Select
End Sub
2.MsgBox "中华人民共和国 " & _
"尼日利亚 " & _
"古巴 "
3.MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel
4.MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
31楼
静思雨
1、
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.              MsgBox "上旬"
  13.         Case Is <= 20
  14.              MsgBox "中旬"
  15.         Case Else
  16.              MsgBox "下旬"
  17.     End Select
  18. End Sub
2、
  1. Sub 三行()
  2.     MsgBox "中华人民共和国" _
  3.     & " 尼日利亚" _
  4.     & " 古巴"
  5. End Sub
3、
  1. Sub ABC()
  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
  3. End Sub
4、
  1. MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
小影
32楼
bdf001
群内昵称“五期星”,第一次交作业也不知去那里交,就以附件上传吧,今天的授课时后面的内容由于突然断电没听上,后来看了一下老师上传的课件,但第四题还是不会做,没在家也没法翻课本,所以在网上和老师之前的课件里翻了半天才算是完成了,也不知对错~~?真心希望得到罗老师的教导!
第十一课作业1.rar
老师辛苦了**!
33楼
winnief3
第11次作业
广东-cx 第11次作业.zip
34楼
向快乐出发
  1.     Sub test()
  2.     With Worksheets("总表")
  3.     If .Range("A:A").ColumnWidth > 50 Then
  4.     .Range("A:A").ColumnWidth = 50
  5.     Else
  6.     .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.     .Range("A:A").Clear
  8.     End If
  9.     End With
  10.     Select Case Day(Date)
  11.     Case Is <= 10
  12.     MsgBox "上旬"
  13.     Case Is <= 20
  14.     MsgBox "中旬"
  15.     Case Else
  16.     MsgBox "下旬"
  17.     End Select
  18.     End Sub

  19.     MsgBox
  20.     "中华人民共和国" _
  21.     "尼日利亚" _
  22.     "古巴"
35楼
NULL
1.把以下代码缩进对齐:
Sub test()
With Worksheets("总表")
    If .Range("A:A").ColumnWidth > 50 Then
        .Range("A:A").ColumnWidth = 50
    Else
        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
        .Range("A:A").Clear
    End If
End With

Select Case Day(Date)
    Case Is <= 10
        MsgBox "上旬"
    Case Is <= 20
        MsgBox "中旬"
    Case Else
        MsgBox "下旬"
End Select
End Sub
2、将以下代码书写成三行,但是功能不变。
MsgBox "中华人民共和国 " & _
       "尼日利亚 " & _
       "古巴"
3、修改以下代码,将53改写为常量形式,不用数值。
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
4、修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
36楼
hcl0123
1.把以下代码缩进对齐:
Sub test()
With Worksheets("总表")
If .Range("A:A").ColumnWidth > 50 Then
    .Range("A:A").ColumnWidth = 50
Else
    .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
    .Range("A:A").Clear
    End If
    End With
Select Case Day(Date)
    Case Is <= 10
        MsgBox "上旬"
    Case Is <= 20
        MsgBox "中旬"
    Case Else
        MsgBox "下旬"
    End Select
End Sub
2.将以下代码书写成三行,但是功能不变。
MsgBox "中华人民共和国 " _
    & "古巴" _
    & "古巴"
   
     '3.修改以下代码,将53改写为常量形式,不用数值。
Sub AAAA()
MsgBox Format(Date, "AAAA,yyyy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
MsgBox Range("IV3").End(xlUp).Column
37楼
元兴华
javascript:;
第十一课作业(=兴华).zip
38楼
天空的雨
免费听课群-天空答-第11课作业.rar




39楼
lene
  1. 1、
  2. Sub test()
  3.     With Worksheets("总表")
  4.         If .Range("A:A").ColumnWidth > 50 Then
  5.             .Range("A:A").ColumnWidth = 50
  6.             Else
  7.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  8.             .Range("A:A").Clear
  9.         End If
  10.     End With
  11.     Select Case Day(Date)
  12.         Case Is <= 10
  13.         MsgBox "上旬"
  14.         Case Is <= 20
  15.         MsgBox "中旬"
  16.         Case Else
  17.         MsgBox "下旬"
  18.     End Select
  19. End Sub

  20. 2、
  21. Sub test()
  22.     MsgBox "中华人民共和国 " _
  23.     & "尼日利亚 " _
  24.     & "古巴"
  25.   End Sub

  26. 3、
  27. Sub ABC()
  28. MsgBox Format(Date, "AAAA,yy-mm-      dd"), vbRetryCancel + vbExc**tion
  29. End Sub

  30. 4、
  31. Sub ABC()
  32. MsgBox Cells(3, Columns.Count) .End(1).Column
  33. End Sub

40楼
夏夜
课后练习
第11课作业-aabubu.rar
41楼
转角爱
  1. Sub ABC()

  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion

  3. End Sub

  4. 1.把以下代码缩进对齐:
  5. Sub test()
  6. With Worksheets("总表")
  7.     If .Range("A:A").ColumnWidth > 50 Then
  8.        .Range("A:A").ColumnWidth = 50
  9.     Else
  10.        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  11.        .Range("A:A").Clear
  12.     End If
  13. End With
  14. Select Case Day(Date)
  15.     Case Is <= 10
  16.     MsgBox "上旬"
  17.     Case Is <= 20
  18.     MsgBox "中旬"
  19.     Case Else
  20.     MsgBox "下旬"
  21. End Select
  22. End Sub

  23. Sub dd()
  24.   MsgBox "中华人民共和国" & Chr(10) & "尼日利亚" & Chr(10) & "古巴"
  25. End Sub

  26. Sub d()
  27. MsgBox Cells(1, Columns.Count).End(1).Column
  28. End Sub



42楼
转角爱
不坏 635731146
  1. Sub ABC()

  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion

  3. End Sub

  4. 1.把以下代码缩进对齐:
  5. Sub test()
  6. With Worksheets("总表")
  7.     If .Range("A:A").ColumnWidth > 50 Then
  8.        .Range("A:A").ColumnWidth = 50
  9.     Else
  10.        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  11.        .Range("A:A").Clear
  12.     End If
  13. End With
  14. Select Case Day(Date)
  15.     Case Is <= 10
  16.     MsgBox "上旬"
  17.     Case Is <= 20
  18.     MsgBox "中旬"
  19.     Case Else
  20.     MsgBox "下旬"
  21. End Select
  22. End Sub

  23. Sub dd()
  24.   MsgBox "中华人民共和国" & Chr(10) & "尼日利亚" & Chr(10) & "古巴"
  25. End Sub

  26. Sub d()
  27. MsgBox Cells(1, Columns.Count).End(1).Column
  28. End Sub



43楼
498429525
excel 混混
1‘
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
          MsgBox "上旬"
        Case Is <= 20
          MsgBox "中旬"
        Case Else
          MsgBox "下旬"
    End Select
End Sub

2’
MsgBox "中华人民共和国 " & _
       "尼日利亚 " & _
       "古巴"
3‘
Sub ABC()
  MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel
End Sub
4’
MsgBox Range("IV3").End(xlToLeft).Column
44楼
某年某月某日
1题.Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
        .Range("A:A").ColumnWidth = 50
         Else
        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
        .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
        MsgBox "上旬"
        Case Is <= 20
        MsgBox "中旬"
        Case Else
        MsgBox "下旬"
    End Select
End Sub


2题.Sub text1()
'MsgBox "中华人民共和国 _
              '尼日利亚 _
               古巴 ""
End Sub



3题.Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub


4题.MsgBox Range("IV3").End(xlUp).Column

                                  群号:某某某-VBA

45楼
gaoshuichang1
第十一课作业.zip

1、把以下代码缩进对齐:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
            MsgBox "上旬"
        Case Is <= 20
            MsgBox "中旬"
        Case Else
            MsgBox "下旬"
    End Select
End Sub
2、将以下代码书写成三行,但是功能不变。
MsgBox “中华人民共和国 “ & _
“尼日利亚 “ & _
“古巴”
3、修改以下代码,将53改写为常量形式,不用数值。
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion+ vbRetryCancel
End Sub
4、修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
MsgBox Range("IV3").End(xlToLeft).Column
46楼
llh505
Rem:第一题
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
        .Range("A:A").ColumnWidth = 50
        Else
        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
        .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
        MsgBox "上旬"
        Case Is <= 20
        MsgBox "中旬"
        Case Else
        MsgBox "下旬"
    End Select
End Sub

Sub 第二题()
'2.将以下代码书写成三行,但是功能不变。
'1.  MsgBox "中华人民共和国 尼日利亚 古巴"
    MsgBox "中华人民共和国" _
    & "尼日利亚" _
    & "古巴"
End Sub
Sub 第三题()
    '3.修改以下代码,将53改写为常量形式,不用数值。
    '1.  Sub ABC()
    '2.  MsgBox Format(Date, "AAAA,yy-mm-dd"), 53
    '3.  End Sub
    MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion + vbDefaultButton1
End Sub

Sub 第四题()
    '4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
    '1.  MsgBox Range("IV3").End(1).Column
    MsgBox Range("IV3").End(xlToLeft).Column
End Sub
47楼
csppglass
江苏0基
作业11.rar
48楼
zjyxp
上交第11课作业,请老师指点,谢谢!
第11课作业zjyxp.rar


1.        把以下代码缩进对齐:
Sub test()
With Worksheets("总表")
If .Range("A:A").ColumnWidth > 50 Then
.Range("A:A").ColumnWidth = 50
Else
.Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
.Range("A:A").Clear
End If
End With
Select Case Day(Date)
Case Is <= 10
MsgBox "上旬"
Case Is <= 20
MsgBox "中旬"
Case Else
MsgBox "下旬"
End Select
End Sub
解答:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
    Case Is <= 10
        MsgBox "上旬"
    Case Is <= 20
        MsgBox "中旬"
    Case Else
        MsgBox "下旬"
    End Select
End Sub
2.将以下代码书写成三行,但是功能不变。
1.        MsgBox "中华人民共和国 尼日利亚 古巴"
答:MsgBox "中华人民共和国 " & _
        "尼日利亚 " & _
        "古巴"
复制代码
3.修改以下代码,将53改写为常量形式,不用数值。
1.        Sub ABC()
2.        MsgBox Format(Date, "AAAA,yy-mm-dd"), 53
3.        End Sub
复制代码
  
答:
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel
End Sub
4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
1.        MsgBox Range("IV3").End(1).Column
复制代码
答:MsgBox Cells(Columns.Count, 1).End(xlToLeft).Column
49楼
twozisan
11課作業_1341.zip
50楼
shirley-86
1、Sub test()
     With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
            Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
         End If
     End With
         Select Case Day(Date)
             Case Is <= 10
             MsgBox "上旬"
            Case Is <= 20
             MsgBox "中旬"
            Case Else
             MsgBox "下旬"
        End Select
End Sub

2、
Sub 字符截断()
MsgBox "中华人民共和国" _
& "尼日利亚" _
& "古巴"
End Sub

3、
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), VbRetryCancel+VbExc**tion
End Sub

4、
Cells(rows.count,3)
Msgbox range(“IV” & rows.count).end(1).column

51楼
爱情和面包
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), VBA.vbExc**tion + vbRetryCancel
End Sub
52楼
爱情和面包
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion + vbRetryCancel
End Sub
53楼
健康快乐123
原昵称:006-水上漂123,现改为:学员:水上漂123
第一题
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.             Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.         MsgBox "上旬"
  13.         Case Is <= 20
  14.         MsgBox "中旬"
  15.         Case Else
  16.         MsgBox "下旬"
  17.     End Select
  18. End Sub
第二题
  1. Sub tt()
  2. MsgBox "中华人民共和国" _
  3. & "尼日利亚" _
  4. & "古巴"
  5. End Sub
第三题
  1. Sub abc()
  2. MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
  3. End Sub
第四题
  1. Sub xgdm()
  2. MsgBox Cells(3, Columns.Count).End(1).Column
  3. End Sub
54楼
lb425319789
1.把以下代码缩进对齐:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
           .Range("A:A").ColumnWidth = 50
        Else
           .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
           .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
            MsgBox "上旬"
        Case Is <= 20
            MsgBox "中旬"
        Case Else
            MsgBox "下旬"
    End Select
End Sub
2.
MsgBox "中华人民共和国"  
           &"尼日利亚"
          &"古巴"
3.Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbExc**tion+vbRetryCancel
End Sub
4.
抱歉,刚学习VBA,本题不会
55楼
一点点
糊啦啦作业

作业1.把以下代码缩进对齐:
Sub test()
With Worksheets("总表")
If .Range("A:A").ColumnWidth > 50 Then
.Range("A:A").ColumnWidth = 50
Else
.Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
.Range("A:A").Clear
End If
End With
Select Case Day(Date)
Case Is <= 10
MsgBox "上旬"
Case Is <= 20
MsgBox "中旬"
Case Else
MsgBox "下旬"
End Select
End Sub
答:
1)利用编辑菜单栏里的缩进功能:
Sub test()
'第一步选择with  end with 语块通过编辑菜单栏的缩进功能缩进
    With Worksheets("总表")
'第二步选择IF  END IF配套语块通过编辑菜单栏缩进
        If .Range("A:A").ColumnWidth > 50 Then
Rem 第三步if里面的的语句也缩进
          .Range("A:A").ColumnWidth = 50
        Else
Rem 同第三步
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
Rem 同第三步
            .Range("A:A").Clear
        End If
    End With
'第四步 选择select end select语块通过编辑栏的缩进按钮缩进
    Select Case Day(Date)
'第五步,从本行至msgbox"下旬"通过编辑栏的缩进按钮缩进
        Case Is <= 10
Rem 第六步select语句里的case下的代码也通过编辑栏的缩进功能
        MsgBox "上旬"
        Case Is <= 20
Rem 同第六步
        MsgBox "中旬"
        Case Else
Rem 同第六步
        MsgBox "下旬"
    End Select
End Sub

2)利用单行手动缩进:
Sub test()
    With Worksheets("总表") 'tab 1次
        If .Range("A:A").ColumnWidth > 50 Then 'tab 2次
            .Range("A:A").ColumnWidth = 50 'tab 3次
        Else 'tab 2次
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5 'tab 3次
            .Range("A:A").Clear 'tab 3次
        End If 'tab 2次
    End With 'tab  1次
    Select Case Day(Date) 'tab 1次
        Case Is <= 10 'tab  2次
            MsgBox "上旬" 'tab 3次
        Case Is <= 20 'tab 2次
            MsgBox "中旬" 'tab 3次
        Case Else 'tab 2次
            MsgBox "下旬" 'tab 3次
    End Select 'tab 1次
End Sub
3)利用美化插件,实现自动排序功能

 


作业2.将以下代码书写成三行,但是功能不变。
       
MsgBox "中华人民共和国 尼日利亚 古巴"

答:
Sub test()
        MsgBox "中华人民共和国" & _
         " 尼日利亚" & _
         " 古巴"
End Sub
PS:一直都知道换行录入代码要用_表示,今天才知道也需要用&链接_才可以


作业3.修改以下代码,将53改写为常量形式,不用数值。
1.        Sub ABC()
2.        MsgBox Format(Date, "AAAA,yy-mm-dd"), 53
3.        End Sub


答:
Sub ABC()
    MsgBox Format(Date, "AAAA,yy-mm-dd"), vbIgnore + vbExc**tion
End Sub
PS:vbignore=5 表示按钮样式,vbexc**tion=48表示注意图示


作业4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
MsgBox Range("IV3").End(1).Column

答:
Sub test()       
    MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
End Sub

哎~不适合学VBA一写代码就失眠……
56楼
miantiao1
作业:杭州_面条传说:
1:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
            MsgBox "上旬"
        Case Is <= 20
            MsgBox "中旬"
        Case Else
            MsgBox "下旬"
    End Select
End Sub

2:
Sub 显示国家()
    Dim Str As String
    Str = "中华人民共和国 尼日利亚 古巴"
    MsgBox Str
End Sub

3:
Sub ABC()
    Const Num_Code As Integer = 53
    MsgBox Format(Date, "AAAA,yy-mm-dd"), Num_Code
End Sub

4:
Sub Rng_Rang()
   MsgBox Cells(3, Columns.Count).End(1).Column ' 查找第3行所在的最右边的列数
End Sub
57楼
124803430
最后一题不会写
我在群内名字是疯狂小兵
作业.zip
58楼
hjsky
四川-幺幺的作业
四川-幺幺的第十一课作业.rar
59楼
jsrgsunny
江苏-阳光明媚,qq:1975225261
1、Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
            Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
            MsgBox "上旬"
        Case Is <= 20
            MsgBox "中旬"
        Case Else
            MsgBox "下旬"
    End Select
End Sub

2、MsgBox "中华人民共和国" _
& "尼日利亚" _
& "古巴" _

3、Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
60楼
kouhogliang
q群昵称:炼
第1题

答:1.选择第2行到第17行,按tab键
  2.选择第3行到第8行,按tab键
  3.选择第4行,按tab键
  4.选择第6行和第7行,按tab键
  5,选择第11行到第16行,按tab键
  6.选择第12行,按Tab键
  7.选择第14行,按Tab键
  8.选择第16行,按Tab键

第2题
答:MsgBox "中华人民共和国"_
& "尼日利亚"_
&  "古巴"

第3题
61楼
天天向上up
ID:879601550(湖南-布吉岛)

1、
Sub test()

    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
   
   
    Select Case Day(Date)
            Case Is <= 10
                MsgBox "上旬"
        
            Case Is <= 20
                MsgBox "中旬"
        
            Case Else
                MsgBox "下旬"
    End Select

End Sub

2、
MsgBox "中华人民共和国 " _
         & "尼日利亚 " _
         & "古巴 "


3、
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), _
                vbRetryCancel + vbExc**tion
End Sub

4、
MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
62楼
nocturne
VBA11课作业-nocturne.zip
63楼
zbkfbyb
Sub ABC()

第三题答案
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion

End Sub

64楼
zbkfbyb
第二题答案:MsgBox "中华人民共和国 _
                 尼日利亚 _
                 古巴"
65楼
zbkfbyb
第一题答案:Sub test()
        With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
        .Range("A:A").ColumnWidth = 50
        Else
        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
        .Range("A:A").Clear
        End If
        End With
        Select Case Day(Date)
        Case Is <= 10
        MsgBox "上旬"
        Case Is <= 20
        MsgBox "中旬"
        Case Else
        MsgBox "下旬"
        End Select
        End Sub
66楼
ldc6213
答题 QQ171774787
答第11课.rar
67楼
bidededede
作业 请阅
56340122.rar
68楼
paoge
                   单肩包时代

1.把以下代码缩进对齐:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
           .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
           Case Is <= 10
             MsgBox "上旬"
           Case Is <= 20
             MsgBox "中旬"
    Case Else
        MsgBox "下旬"
    End Select
End Sub
2.将以下代码书写成三行,但是功能不变。
Sub test()
    MsgBox "中华人民共和国 " _
    & "尼日利亚 " _
    & "古巴"
End Sub
3.修改以下代码,将53改写为常量形式,不用数值。
Sub ABC()

MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel

End Sub
4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
Sub ABC()

   MsgBox Cells(Rows.Count, 1).End(xlUp).Column

End Sub
69楼
筱悠
筱悠的作业~

1.把以下代码缩进对齐:
Sub test()

With Worksheets("总表")
     If .Range("A:A").ColumnWidth > 50 Then
         .Range("A:A").ColumnWidth = 50
     Else
         .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
         .Range("A:A").Clear
     End If
End With

Select Case Day(Date)
    Case Is <= 10
        MsgBox "上旬"
    Case Is <= 20
        MsgBox "中旬"
    Case Else
        MsgBox "下旬"
End Select

End Sub



2.将以下代码书写成三行,但是功能不变。

MsgBox "中华人民共和国" & Chr(13) & "尼日利亚 " & Chr(13) & "古巴"




3.修改以下代码,将53改写为常量形式,不用数值。

Sub ABC()

MsgBox Format(Date, "AAAA,yy-mm-dd"), VbRetryCancel+VbYesNoCancel

End Sub
复制代码





4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。

MsgBox Cells(3, Cells.Columns.Count).End(1).Column
70楼
暗香盈袖
十一课作业
第十一课作业-暗香盈袖.zip
71楼
冰淇林的冬天
第一题
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
    Case Is <= 10
        MsgBox "上旬"
    Case Is <= 20
        MsgBox "中旬"
    Case Else
        MsgBox "下旬"
    End Select
End Sub
第二题
MsgBox "中华人民共和国" _
  & "尼日利亚" _
  & "古巴"

第三题
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
第四题
  MsgBox Range(Column.Count & "3").End(xlDown).Column
冰激凌的冬天  群号30729794
72楼
黑蔓巴
1.把以下代码缩进对齐:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
        .Range("A:A").ColumnWidth = 50
    Else
        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
        .Range("A:A").Clear
    End If
    End With
        Select Case Day(Date)
        Case Is <= 10
        MsgBox "上旬"
        Case Is <= 20
        MsgBox "中旬"
        Case Else
        MsgBox "下旬"
    End Select
End Sub
2.将以下代码书写成三行,但是功能不变。
MsgBox "中华人民共和国 尼日利亚 古巴"
MsgBox "中华人民共和国" _
         & "尼日利亚" _
          & "古巴"
3.修改以下代码,将53改写为常量形式,不用数值。
Sub ABC()
MsgBox Format(Date, "AAAA,yy-mm-dd"), 53------MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
MsgBox  Range("IV3").End(1).Column----- MsgBox Range("IV3").Column
73楼
sharkzhou
第11课作业提交,罗老师我第4题还是没明白,我用的是2003
十一课作业.zip
74楼
纵鹤擒龙水中月
  1. Sub test1()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.     Case Is <= 10
  12.         MsgBox "上旬"
  13.     Case Is <= 20
  14.         MsgBox "中旬"
  15.     Case Else
  16.         MsgBox "下旬"
  17.     End Select
  18. End Sub
  19. Sub test2()
  20. MsgBox "中华人民共和国 " _
  21. & " 尼日利亚" _
  22. & " 古巴 "
  23. End Sub

  24. Sub test3()
  25. Const fff As Byte = 53
  26. MsgBox Format(Date, "AAAA,yy-mm-dd"), fff
  27. End Sub
75楼
Must敬
不知道这次交起了不。Must敬的作业。
Must敬第十一课作业.rar
76楼
玉丫头
1.把以下代码缩进对齐:
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.             MsgBox "上旬"
  13.         Case Is <= 20
  14.             MsgBox "中旬"
  15.         Case Else
  16.             MsgBox "下旬"
  17.     End Select
  18. End Sub
2.将以下代码书写成三行,但是功能不变。
  1. MsgBox "中华人民共和国 " _
  2. & "尼日利亚 " _
  3. & "古巴"
3.修改以下代码,将53改写为常量形式,不用数值。
  1. Sub ABC()
  2.     MsgBox Format(Date, "AAAA,yy-mm-dd"), 53
  3.     MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
  4. End Sub
4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
  1. MsgBox Range("IV3").End(1).Column
  2.     MsgBox Cells(3, Columns.Count).End(xlToLeft).Column
77楼
eric2345
江苏-eric交11课作业,有事耽搁交晚了,不好意思
江苏-eric - 第11课 课后作业.rar
78楼
黄金眼
第11课作业.zip

QQ号:312155343
79楼
本人号被盗,
1\Sub test()
    With Worksheets("总表")
       If .Range("A:A").ColumnWidth > 50 Then
       .Range("A:A").ColumnWidth = 50
       Else
       .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
       .Range("A:A").Clear
       End If
    End With
    Select Case Day(Date)
    Case Is <= 10
    MsgBox "上旬"
    Case Is <= 20
    MsgBox "中旬"
    Case Else
    MsgBox "下旬"
    End Select
End Sub
2\

3\Sub ABC()

MsgBox Format(Date, "AAAA,yy-mm-dd"), vbYesNo + vbQuestion

End Sub
4\MsgBox Range("IV3").End(xlUp).Column
河南蓝天 249229293
80楼
天使ぉ之翼
1.把以下代码缩进对齐:
Sub test()
   With Worksheets("总表")
      If .Range("A:A").ColumnWidth > 50 Then
         .Range("A:A").ColumnWidth = 50
      Else
         .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
         .Range("A:A").Clear
      End If
   End With
   Select Case Day(Date)
    Case Is <= 10
       MsgBox "上旬"
    Case Is <= 20
       MsgBox "中旬"
    Case Else
       MsgBox "下旬"
   End Select
End Sub
2.将以下代码书写成三行,但是功能不变。
1. MsgBox "中华人民共和国 尼日利亚 古巴"
" MsgBox ""中华人民共和国""& _
         ""尼日利亚""& _   
         ""古巴"""

3.修改以下代码,将53改写为常量形式,不用数值。
1. Sub ABC()
2. MsgBox Format(Date, "AAAA,yy-mm-dd"),VbRetryCancel+VbRetryCancel
3. End Sub


4.修改以代码,使其通过于Excel 2003、2007、2010,同时提升代码的可读性。
1. MsgBox Range("IV3").End(1).Column
           MsgBox Range("IV3").End(xltoright).Column
QQming :天使ぉ之翼
81楼
fengling5566
(两天前交了,不知怎的没提交成功,现在再交一次,如果上次已经提交成功了,就请忽略本次;
老师见谅~)
风铃(646298668)11课作业

1、将一段代码缩进:
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
           .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
            MsgBox "上旬"
        Case Is <= 20
            MsgBox "中旬"
        Case Else
            MsgBox "下旬"
    End Select
End Sub

2、MsgBox "中华人民共和国 尼日利亚 古巴"写成三行:
答案:
MsgBox "中华人民共和国 " _
& "尼日利亚 " _
& "古巴"

3、MsgBox Format(Date, "AAAA,yy-mm-dd"), 53将53改为常量形式:
vbRetryCancel + vbExc**tion

4、修改代码,提高可读性、通用性:
MsgBox Range("IV3").End(1).Column

这道题真的不会错,没看懂意思。貌似是"IV3"要照顾旧版本吧
range.end用帮助查了是定位到原区域尾端,
但还是不太明白,请老师见谅。
82楼
gls08
随心所欲

1、
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
        .Range("A:A").ColumnWidth = 50
        Else
        .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
        .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
        Case Is <= 10
        MsgBox "上旬"
        Case Is <= 20
        MsgBox "中旬"
        Case Else
        MsgBox "下旬"
    End Select
End Sub
2、
MsgBox "中华人民共和国 " _
      & "尼日利亚 " _
      & "古巴"
3、
Sub ABC()
'MsgBox Format(Date, "AAAA,yy-mm-dd"), 53
MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion
End Sub
4、
MsgBox Range("IV3").End(xlToLeft).Column
83楼
女子无殇
题1:
  1. Sub test()
  2.     With Worksheets("总表")
  3.         If .Range("A:A").ColumnWidth > 50 Then
  4.             .Range("A:A").ColumnWidth = 50
  5.         Else
  6.             .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
  7.             .Range("A:A").Clear
  8.         End If
  9.     End With
  10.     Select Case Day(Date)
  11.         Case Is <= 10
  12.             MsgBox "上旬"
  13.         Case Is <= 20
  14.             MsgBox "中旬"
  15.         Case Else
  16.             MsgBox "下旬"
  17.     End Select
  18.    
  19.             
  20. End Sub
题2:
  1. MsgBox "中华人民共和国 " & _
  2.     "尼日利亚 " & _
  3.     "古巴"
题3:
  1. Sub ABC()

  2.     MsgBox Format(Date, "AAAA,yy-mm-dd"), vbRetryCancel + vbExc**tion

  3. End Sub
题4:
  1. MsgBox Cells(3, Columns.Row).End(xlToLeft).Column
84楼
qing33670000
1.
Sub test()
    With Worksheets("总表")
        If .Range("A:A").ColumnWidth > 50 Then
            .Range("A:A").ColumnWidth = 50
        Else
            .Range("A:A").ColumnWidth = .Range("A:A").ColumnWidth * 5
            .Range("A:A").Clear
        End If
    End With
    Select Case Day(Date)
    Case Is <= 10
        MsgBox "上旬"
    Case Is <= 20
        MsgBox "中旬"
    Case Else
        MsgBox "下旬"
    End Select
End Sub


2.
  1. MsgBox _
  2. "中华人民共和国 " & _
  3. "尼日利亚 古巴"
3.
  1. Sub ABC()
  2. Const aa As Integer = 53
  3. MsgBox Format(Date, "AAAA,yy-mm-dd"), aa
  4. End Sub
4.MsgBox Cells(3, Columns.Count).End(1).Column
85楼
cxleaf
补交作业
第11课作业(cxleaf).rar

免责声明

有感于原ExcelTip.Net留存知识的价值及部分知识具有的时间限定性因素, 经与ExcelTip.Net站长Apolloh商议并征得其同意, 现将原属ExcelTip.Net的知识帖采集资料于本站点进行展示, 供有需要的人士查询使用,也慰缅曾经的论坛时代。 所示各个帖子的原作者如对版权有异议, 可与本人沟通提出,或于本站点留言,我们会尽快处理。 在此,感谢ExcelTip.Net站长Apolloh的支持,感谢本站点所有人**绿色风(QQ:79664738)**的支持与奉献,特此鸣谢!
------本人网名**KevinChengCW(QQ:1210618015)**原ExcelTip.Net总版主之一

评论列表
sitemap