编程论坛
注册
登录
编程论坛
→
VB6论坛
vb引用中没有Microsoft Excel 12.0 Object Library 怎么回事
jualian
发布于 2013-01-24 16:08, 9138 次点击
vb引用中没有Microsoft Excel 12.0 Object Library 怎么回事
5 回复
#2
风吹过b
2013-01-24 16:17
装一个 OFFICE 12 吧。
不记得这个是哪个版本了。
#3
jualian
2013-01-24 16:55
回复 2楼 风吹过b
先谢了,我试试。。。
#4
yz1025
2013-01-24 17:05
程序代码:
'
获取当前Office版本的函数
Public
Function
GetInstalledOfficeVersion()
As
String
On
Error
Resume
Next
Dim
WD
Dim
OfficeVer
As
String
OfficeVer =
0
GetInstalledOfficeVersion =
""
Set
WD =
CreateObject
(
"
Word.Application.8
"
)
OfficeVer =
CStr
(WD.Version)
WD.quit
If
Not
WD
Is
Nothing
Then
Set
WD =
Nothing
If
InStr
(OfficeVer,
"
8
"
) <>
0
Then
GetInstalledOfficeVersion =
"
Microsoft Office 97
"
ElseIf
InStr
(OfficeVer,
"
9
"
) <>
0
Then
GetInstalledOfficeVersion =
"
Microsoft Office 2000
"
ElseIf
InStr
(OfficeVer,
"
10
"
) <>
0
Then
GetInstalledOfficeVersion =
"
Microsoft Office XP 2002
"
ElseIf
InStr
(OfficeVer,
"
11
"
) <>
0
Then
GetInstalledOfficeVersion =
"
Microsoft Office 2003
"
ElseIf
InStr
(OfficeVer,
"
12
"
) <>
0
Then
GetInstalledOfficeVersion =
"
Microsoft Office 2007
"
ElseIf
InStr
(OfficeVer,
"
13
"
) <>
0
Then
GetInstalledOfficeVersion =
"
Microsoft Office 2010
"
ElseIf
InStr
(OfficeVer,
"
14
"
) <>
0
Then
GetInstalledOfficeVersion =
"
Microsoft Office 2012
"
End
If
If
Err.Number =
424
Then
Err.Clear
GetInstalledOfficeVersion =
"
Not Install Microsoft Office or Over 2007
"
End
If
End Function
#5
jualian
2013-01-25 08:59
office12下载不了呀,呜。。。
#6
jualian
2013-01-29 13:21
重新安装了一下office2007就有了。。。
谢谢楼上各位
1