Java运行时错误 类型,“运行时错误13:类型不匹配”

我有VBA程序,允许用户在活动Excel工作表的第一行输入名称(整数/字符串/等)来编写 Headers . 写入输入后,我需要在相邻的单元格中写入输出 .

逐行逐行,我相信这是产生错误的问题行

运行时错误13:输入不匹配

Cells(1, counter + inputnum) = outputnum

这是相关的功能:

Sub enteroutputs()

title = "K-Map Program"

outputnum = Application.InputBox("How many outputs?", title)

If IsNumeric(outputnum) = False Then

problem = "output"

Call notnum

End If

For counter = 1 To outputnum

outputnum = Application.InputBox("Enter output name.", title)

Cells(1, counter + inputnum) = outputnum

Next

Dim ok

ok = MsgBox("Enter outputs in " & ActiveSheet.Name & " .", vbOKOnly)

End Sub

inputnum在此函数之前执行的函数中定义:

Sub enterinputs()

title = "K-Map Program"

inputnum = Application.InputBox("How many inputs?", title)

If IsNumeric(inputnum) = False Then

problem = "input"

Call notnum

End If

For counter = 1 To inputnum

inputnum = Application.InputBox("Enter input name.", title)

Cells(1, counter) = inputnum

Next

Call enteroutputs

结束子

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值