vb总是出现缺少子程序 函数或属性 是怎么回事?
发布网友
发布时间:2023-05-27 02:09
我来回答
共3个回答
热心网友
时间:2024-05-05 02:55
名称和上面的BUTTON重了,改个名就好了.
热心网友
时间:2024-05-05 02:56
Button()
热心网友
时间:2024-05-05 02:56
只能说你的程序语法错误一大堆,可能是从来没有写过vb的。
我修改了一下你的代码如下:
Dim firstnum As Boolean
Dim strnum1 As String
Private Sub Command1_Click(index As Integer)
Select Case index
Case 0 To 9
If firstnum Then
strnum1 = Trim(Str(index))
firstnum = False
Else
strnum1 = strnum1 & Trim(Str(index))
End If
Text1.Text = strnum1
End Select
End Sub
Private Sub Form_Load()
Dim index As Integer
For index = 0 To 9
Command1(index).Caption = index
Next index
Command1(10).Caption = "."
Command1(11).Caption = "="
Command1(12).Caption = "+"
Command1(13).Caption = "-"
Command1(14).Caption = "*"
Command1(15).Caption = "/"
Command1(16).Caption = "清除"
firstnum = True
strnum1 = ""
End Sub
我建议你还是先找本基础书籍来看一下。追问你确定你懂VB??!你知道我要做什么吗?
你那串代码你知道是干什么的吗?
不懂不要装~
vb总是出现缺少子程序 函数或属性 是怎么回事?
只能说你的程序语法错误一大堆,可能是从来没有写过vb的。我修改了一下你的代码如下:Dim firstnum As Boolean Dim strnum1 As String Private Sub Command1_Click(index As Integer)Select Case index Case 0 To 9 If firstnum Then strnum1 = Trim(Str(index))firstnum = False Else strnum...
vb缺少子程序函数或属性?!!
此外,每个for 都要有一个next 来标志循环体的范围,否则是要报错的。
求问VBA编程中出现错误:缺少子程序、函数或属性
部分代码有误,修正参考如下:Public Sub 自动记录调查数据()Dim temp As Integer Dim count As Integer temp=Sheets("数据表").[A1].CurrentRegion.Rows.count count = temp - 3 'Sheets("问卷").Select Range("A50:H50").Select Selection.Copy 'Sheets("数据表").Activate Rows(temp + 1)....
vb程序中缺少子程序,函数或属性
这个源代码有2个地方错误:1、经调试,Picture1.Print a(j).zgh; a(j).xm: a(j).gz错把;打错为:。2、最多可存放5人的数据,经调试,这个程序只能存储4个数据,打印出来也是4个数据。经修改后的代码为:Option Explicit Private Type zg zgh As String * 3 xm As String * 3 gz As ...
vb调试缺少子程序、函数或属性的错误。。help
selectvalue1 1 改成:selectvalue1 = selectvalue1 + 1 其它类似修改
VB中提示缺少子程序、函数或属性,是怎么回事?
你有许多错,自己对比一下:Private Sub Command1_Click()Dim i, a, b, c As Integer For i = 1 To 10 a = Val(InputBox("请输入自然数", "窗口"))If a Mod 2 Then b = b + 1 Else c = c + 1 End If Next Debug.Print "b ="; b, "c ="; c End Sub ...
VB:缺少子程序、函数或属性是怎么回事?
xm As String * 3 gz As Integer End Type Dim a(0 To 4) As zg, i Private Sub command1_click()i = i + 1 If i > 4 Then MsgBox "最多可存放5人的数据": Exit Sub With a(i).zgh = Val(Text1).xm = Text2 .gz = Val(Text3)End With Text1 = "": Text2 = "":...
VB中为什么说缺少子程序,函数或属性
Print "圆的面积为:" : S 把冒号改成分号,为 Print "圆的面积为:" ; S 下边那一句也一样 冒号用来分隔一行中的几条语句,用冒号的话,编译器会把变量S解释为过程,当然就出错了
VB:缺少子程序、函数或属性是怎么回事?
调试代码, 看看错误在那里
VB为什么显示“缺少子程序,函数或属性
Print "数组中的负元素之和为:";s 改为 Print "数组中的负元素之和为:"; s 意思就是不要换行!