在Windows 7上打开我的excel文件时出现429错误,此代码在打开的工作簿上,并且不起作用,在我的Windows XP 32位版本中,它工作正常,但是在迁移到Windows 7 64位时它不起作用,请如何解决此问题。
这是这段代码,它为数据库设置了路径,我进行了一些研究,其中说使用regsvr并为64位安装active x dll,有人可以帮我吗
我将此活动控件用作插件:出现错误的代码是:
H_SetArchiveDataPath ("\\BDC-AERO\public\Traitement Thermique\Eurotherm\Review\review.erv")
我将此文件用于活动的x:https://slideplayer.com/slide/5735856/
UH_SetArchiveDataPath ("\\BDC-AERO\public\Traitement Thermique\Eurotherm\Review\review.erv")
' $Id: UHExcelAddinBasicSrc.txt,v 1.1.2.20 2002/09/03 14:19:40 colinl Exp $
' the file UHExcelAddinBasicSrc.txt is a text file containing the source of the visual basic
' for the Excel Addin for the UHistory ActiveX Control
'!!!This bit goes in uhistory.xla module1
' ensure variables only have local function scope
Option Explicit
' ShellExecute API used to open the help file
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
' constants for registry access
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_CURRENT_CONFIG = &H80000005
Const HKEY_DYN_DATA = &H80000006
Const REG_SZ = 1 'Unicode nul terminated string
Const REG_BINARY = 3 'Free form binary
Const REG_DWORD = 4 '32-bit number
Const ERROR_SUCCESS = 0&
Const KEY_QUERY_VALUE = &H1
' registry access functions
Private Declare Function RegCloseKey Lib "advapi32.dll" _
(ByVal hKey As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias _
"RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, _
ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As _
Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" _
Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName _
As String, ByVal lpReserved As Long, lpType As Long, lpData _
As Any, lpcbData As Long) As Long
'defined activeX control error codes
Const UH_ERR_INDEX As Long = -7
Const UH_ERR_TIMERANGE As Long = -8
Const UH_ERR_NODATA As Long = -39
Const UH_ERR_INSTANDGRP_REQUIRED As Long = -44
Const UH_ERR_TIMESTAMP_REQUIRED As Long = -45
Const UH_ERR_RANGE_ROWS As Long = -100
Const UH_ERR_RANGE_COLS As Long = -101
Const UH_ERR_INTERVAL_VALUE As Long = -102
Const UH_ERR_RANGE_INST_GROUP As Long = -103
Const UH_ERR_HELP_FILE As Long = -104
Const UH_HELP_FILENAME = -108 ' pseudo error messages containing help file name
Const UH_ONE_MS = 1 / 24 / 60 / 60 / 1000
Const UH_ADDIN_VERSION As String = "1.1.1000"
Dim UH_Ctl As Object
此处定义了功能
'FUNCTION : UH_SetArchiveDataPath
'DESCRIPTION : Defines the path to the database
'ARGUMENTS: path - Absolute path, can contain filename or just folder
'RETURN :
'NOTES :
'---------------------------------------------------------------------------
Public Sub UH_SetArchiveDataPath(path As String)
UH_CheckInitialise
UH_Ctl.ArchivePath = path
End Sub