vba编程,VBA编程基础问题

1,VBA编程基础问题???你打的什么字啊 。不会是“不”字吧?解释一下这个程序吧 。这里所说的是for循环里面从1到20每次进2个 。就是l从1到3,5,7. 。。。这样最后再小于20的时候就是到结束这个循环了 。
2,跪求vba编程这个是训练题吧,最好自己做Function pdzi(S As Range)If S Like "[a-z,A-Z]" Thenpdzi = "字母"ElseIf S Like "[0-9]" Thenpdzi = "数字"Elsepdzi = "其他"End IfEnd IfEnd Function也可以用Case
3,关于Word中 的VBA 编程解决你的“顺便问下".....Sub Macro1() Dim strText As String strText = "建立反对撒客里空的龙卷风" Selection.TypeText strText Selection.MoveStart Unit:=wdLine, Count:=-1 Selection.MoveEnd Unit:=wdCharacter, Count:=-1 * (Len(Selection.Text) - 4) Selection.MoveStart Unit:=wdCharacter, Count:=3 Selection.Font.Bold = True MsgBox Selection.TextEnd Sub【vba编程,VBA编程基础问题】
4,VBA编程问题Public Sub mxbing1984()Dim cnn As ADODB.ConnectionDim rs As ADODB.RecordsetSet cnn = New ADODB.ConnectionSheet2.Cells.Clear With cnn .Provider = "microsoft.jet.oledb.4.0" .ConnectionString = "Extended Properties=Excel 5.0;" + "Data Source=" + ThisWorkbook.FullName .Open End With Set rs = New ADODB.Recordset Sql = "select 水果类别,超市,Count(*) As 次数From [Sheet1$]Group By 水果,超市 " rs.Open Sql, cnn, adOpenKeyset, adLockBatchOptimistic R = Sheet2.Range("A65536").End(xlUp).Row Sheet2.Range("A" & R + 1).CopyFromRecordset rs rs.Close cnn.Close Set rs = Nothing Set cnn = Nothing Sheet2.cells(1,1).value="http://www.lisdn.com/sjfx/mzjy/水果" Sheet2.cells(1,1).value="http://www.lisdn.com/sjfx/mzjy/超市" Sheet2.cells(1,1).value="http://www.lisdn.com/sjfx/mzjy/次数"End Sub方法:1.按Alt+F11打开VBA编辑器2.工具->设定引用项目3.选择Microsoft ActiveX Data Objects 2.0 Library4.粘贴如上代码5.执行6.得到结果将放在Sheet2

    推荐阅读