close

Вход

Забыли?

вход по аккаунту

?

Re: How to identify missing references (libraries

код для вставки
Re: How to identify missing references (libraries) using VBA
Re: How to identify missing references (libraries)
using VBA
Source:
http://www.techтИТarchive.net/Archive/Office/microsoft.public.office.developer.vba/2005тИТ04/msg00146.html
тАв From: "SA" <~fake.address@xxxxxxxx>
тАв Date: Mon, 25 Apr 2005 07:35:32 тИТ0400
Helge:
You are correct that in Excel Xp and later that the security model does not
trust access to the Visual Basic Project by default. You can see this by
going to Tools тИТ> Macro тИТ> Security тИТ> Trusted Sources tab. This has to be
manually checked by the user for your code to work.
That said, it is very unlikely that for the main applications that a
reference to their object libraries (the OLB references) would be missing.
The likely problem is with assuring that the user has ADO 2.8 if you are
relying on functions in that library. Of course, your installer could
include the ADO 2.8 libraries and require their installation to solve that
problem (of course under administrator log on priviledges only.)
HTH
тИТтИТ
Steve Arbaugh
MS Access MVP
ACG Soft
http://ourworld.compuserve.com/homepages/attacтИТcg
"Helge V. Larsen" <Helge.V.Larsen(RemoveThis)@Risoe.DK(AndThis)> wrote in
message news:d45p2b$8i1$1@xxxxxxxxxxxxxxxxxxxx
>
> I am developing Excel and Access applications that are meant to be used by
> several (many?) other persons.
>
> In the development I am using OfficeтИТ2000 and OfficeтИТXP, but endтИТusers
> will
> use OfficeтИТ97, OfficeтИТ2000 and OfficeтИТXP.
>
> I am opening an Excel object from Access and vice versa an Access object
> from Excel. I am also using new functions in ADO (Microsoft ActiveX Data
> Objects 2.8 Library). Therefore ADO version 2.7 cannot be used.
>
> Consequently, I have in some way to identify missing libraries, i.e.
> libraries that in the VBA editor are found by looking for "MISSING ..." in
Re: How to identify missing references (libraries) using VBA
1
Re: How to identify missing references (libraries) using VBA
> "Tools / References...". Missing libraries could for instance be
> MSACC9.OLB
> or MSACC10.OLB in Excel VBA and EXCEL9.OLB or EXCEL10.OLB in Access VBA.
>
> I think that I have to accept just to be able to warn the user that a
> library is missing. Probably it is not possible to correct the missing
> references through VBA тИТ or is it ??
>
> I have made some VBA that functions in OfficeтИТ2000 :
>
> In Excel :
> ++++++++++
>
> Sub HVL_Find_Missing_References_Excel()
> Dim aReference As Object
> Dim aMsg as String
> aMsg = "Missing reference !" & vbCr & vbCr & _
> "In the VBA editor select menu Tools/References... " & _
> "and identify the missing reference."
> For Each aReference In ActiveWorkbook.VBProject.References
> If aReference.IsBroken Then
> MsgBox aMsg, vbCritical, ActiveWorkbook.Name
> End If
> Next aReference
> End Function
>
> In Access :
> +++++++++++
>
> Sub HVL_Find_Missing_References_Access()
> Dim aProject As Object
> Dim aReference As Object
> Dim aMsg as String
> aMsg = "Missing reference !" & vbCr & vbCr & _
> "In the VBA editor select menu Tools/References... " & _
> "and identify the missing reference."
> For Each aProject In Application.VBE.VBProjects
> For Each aReference In aProject.References
> If aReference.IsBroken Then
> MsgBox aMsg, vbCritical, aProject.FileName
> End If
> Next aReference
> Next aProject
> End Sub
>
> But unfortunately the Excel version does not function in OfficeтИТXP. I
> think
> that it perhaps has something to do with security.
>
> What can I do ?
> Could the Access VBA be changed to function in OfficeтИТXP ?
Re: How to identify missing references (libraries) using VBA
2
Re: How to identify missing references (libraries) using VBA
> Can I solve my problem in quite another way ?
>
> Please HELP !
>
> I would be happy (also) to receive answers to :
> Helge.V.Larsen(RemoveThis)@Risoe.DK(AndThis)
>
>
.
тАв References:
тЩж How to identify missing references (libraries) using VBA
тЧК From: Helge V. Larsen
тАв Prev by Date: Re: VBA Duplex тИТ Access Denied тИТ Can only read settings тИТ VB6 can set Duplex
тАв Next by Date: Re: How can I add items to combo box without using ";" in additem method
тАв Previous by thread: How to identify missing references (libraries) using VBA
тАв Next by thread: ActiveX Control Moves When Enabled
тАв Index(es):
тЩж Date
тЩж Thread
Re: How to identify missing references (libraries) using VBA
3
Документ
Категория
Пионер
Просмотров
7
Размер файла
9 Кб
Теги
1/--страниц
Пожаловаться на содержимое документа