我用的是VB6.0,自动求连续整数之和。
Private Sub Command1_Click()Dim x As LongDim y As LongDim z As LongDim a As Longz = 0If Text1.Text = "" Then MsgBox "请输入起始值"If Text2.Text = "" Then MsgBox "请输入截止值"x = Text1.Texty = Text2.TextFor a = x To yz = z + aNext aText3.Text = zEnd Sub
我用的是VB6.0,我学着做了一段封装VBA的代码,在试运行的时候正常,但在生成工程文件的时候报错:“编译错误,用户类型定义未定义。” 请高手点一下。先谢过了。
Sub hongtong() Dim excelApp As New Excel.Application Dim excelWorkBook As Excel.Workbook Dim excelWorksheet As Excel.Worksheet Set excelWorkBook = excelApp.Workbooks.Add '创建新工作簿 Set excelWorksheet = ex...
我是一名财务人员。一直在自学编程,前几年都是自学,拿着一本书在啃,有不懂的就从网上搜答案。这么多年,进展缓慢。但自从在论坛上学习那就进步快多了。自己有疑惑的地方,经高人一指点,那可是豁然开朗。如拨云雾而见青天啊。