我的程式码打这样
Type StockData
StockCode As Long
StockName As String
Address As String
TEL As String
End Type
Sub 输入股票基本资料()
Dim Stock As StockData
Dim LastRow As Integer
LastRow = Range("A65536").End(xlUp).Row
Stock.StockCode = InputBox("请输入股票代号")
Stock.StockName = InputBox("请输入股票名称")
Stock.Address = InputBox("请输入公司地址")
Stock.TEL = InputBox("请输入公司电话")
Cells(LastRow + 1, 1) = Stock.StockCode
Cells(LastRow + 1, 2) = Stock.StockName
Cells(LastRow + 1, 3) = Stock.Address
Cells(LastRow + 1, 4) = Stock.TEL
End Sub
但执行的时候出现: 编译错误;无法在物件模组中定义公用(public)的使用者定义型态
我使用的教学光盘上面也是这样打却可以执行,拜托各位大大可以解决我的疑惑
谢谢各位!!!!