我正在尝试使用CATIA
了解EXCEL
和VBA
之间的导入/导出数据。
在运行示例宏“Feuil1.Main”时(如this video所示),出现错误
ActiveX组件无法创建对象
我想知道这是否是DLL的问题。如果是的话,我应该安装什么库。
====================代码========================== =
函数GetTypeFichier()As Integer Dim strInput As String,strMsg As String
choix = 0
While (choix < 1 Or choix > 3)
strMsg = "Type in the kind of entities to create (1 for points, 2 for points and splines, 3 for points, splines and loft):"
strInput = InputBox(Prompt:=strMsg, _
Title:="User Info", XPos:=2000, YPos:=2000)
'Validation of the choice
choix = CInt(strInput)
If (choix < 1 Or choix > 3) Then
MsgBox "Invalid value: must be 1, 2 or 3"
End If
Wend
GetTypeFichier = choix
'获取活跃的细胞 “------------------------------------------------- ----------------------- 函数GetCellule(iIndice As Integer,Colone As Integer)As String Dim Chaine As String
Sheets("Feuil1").Select
If (Colone = 1) Then
Chaine = "A" + CStr(iIndice)
ElseIf (Colone = 2) Then
Chaine = "B" + CStr(iIndice)
ElseIf (Colone = 3) Then
Chaine = "C" + CStr(iIndice)
End If
Range(Chaine).Select
GetCellule = ActiveCell.Value
结束功能 函数GetCelluleA(iRang As Integer)As String GetCelluleA = GetCellule(iRang,1) 结束功能 函数GetCelluleB(iRang As Integer)As String GetCelluleB = GetCellule(iRang,2) 结束功能 函数GetCelluleC(iRang As Integer)As String GetCelluleC = GetCellule(iRang,3) 结束功能
=============(这是前两个函数)====================