Gasman
Enthusiastic Amateur
- Local time
- Today, 01:27
- Joined
- Sep 21, 2011
- Messages
- 16,534
Hi all,
I created an excel workbook for the Community Car Scheme I volunteer for.
With help from another forum, it runs a mailmerge to produce pdf in label format.
The controller got a new computer and decided to install it on that computer not the old one.
When I went over there to install the files, I found that the person who sold the computer put some free office type program on it.
This was being activated when I was trying to open Word. I removed the program from the computer, but the bugger is like a virus and left an entry in the registry and shows up in the references.
I found code to list the references and modify them. I emailed him the xlsm and we put it in the folder with the rest of the scheme documents.
However using Anydesk to get onto his computer, when I try and run my code it complains about the Trust Center.
I added the folder to the Trust center and allowed macroes.
Still I get the error.
What else do I need to check so I can run my VBA code just as I would on my laptop?
TIA
This is the first executable line, and it balks on the first executable line Set oRefs
I created an excel workbook for the Community Car Scheme I volunteer for.
With help from another forum, it runs a mailmerge to produce pdf in label format.
The controller got a new computer and decided to install it on that computer not the old one.
When I went over there to install the files, I found that the person who sold the computer put some free office type program on it.
This was being activated when I was trying to open Word. I removed the program from the computer, but the bugger is like a virus and left an entry in the registry and shows up in the references.

I found code to list the references and modify them. I emailed him the xlsm and we put it in the folder with the rest of the scheme documents.
However using Anydesk to get onto his computer, when I try and run my code it complains about the Trust Center.
I added the folder to the Trust center and allowed macroes.
Still I get the error.
What else do I need to check so I can run my VBA code just as I would on my laptop?
TIA
This is the first executable line, and it balks on the first executable line Set oRefs
Code:
Sub xlfVBEListReferences()
' Requires References :: Microsoft Visual Basic for Applications Extensibility 5.3
' C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB
Dim oRef As VBIDE.Reference ' Item
Dim oRefs As VBIDE.References ' Collection
Dim i As Integer
Set oRefs = Application.VBE.ActiveVBProject.References
Debug.Print "Print Time: " & Time & " :: Item - Name and Description"
For Each oRef In oRefs
i = i + 1
Debug.Print "Item " & i, oRef.Name, oRef.Description, oRef.Major, oRef.Minor
Next oRef
Debug.Print vbNewLine
i = 0
Debug.Print "Print Time: " & Time & " :: Item - Full Path"
For Each oRef In oRefs
i = i + 1
Debug.Print "Item " & i, oRef.FullPath
Next oRef
Debug.Print vbNewLine
i = 0
' List the Globally Unique Identifier (GUID) for each library referenced in the current project
Debug.Print "Print Time: " & Time & " :: Item - GUID"
For Each oRef In oRefs
i = i + 1
Debug.Print "Item " & i, oRef.GUID
Next oRef
Debug.Print vbNewLine
End Sub