Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That can run late bound like so
Sub removeCode() Dim VBComp As Object Dim VBComps As Object Set VBComps = ActiveWorkbook.VBProject.VBComponents For Each VBComp In VBComps Select Case VBComp.Type Case vbext_ct_StdModule, vbext_ct_MSForm, _ vbext_ct_ClassModule VBComps.Remove VBComp Case Else With VBComp.CodeModule ..DeleteLines 1, .CountOfLines End With End Select Next VBComp End Sub but that will do nothing re the security settings. You could get it digitally signed, but you would still need the clients to accept your signature as atrusted signature (although they only need to do it once) -- HTH Bob Phillips "George J" wrote in message ... If the macro is digitally signed, will this make it a "trusted source" and allow the changes? Also tried looking at late binding - but can't figure anything out for that. Trying to get this macro to run at the end which is why i need the reference. Sub removeCode() Dim VBComp As VBIDE.VBComponent Dim VBComps As VBIDE.VBComponents Set VBComps = ActiveWorkbook.VBProject.VBComponents For Each VBComp In VBComps Select Case VBComp.Type Case vbext_ct_StdModule, vbext_ct_MSForm, _ vbext_ct_ClassModule VBComps.Remove VBComp Case Else With VBComp.CodeModule .DeleteLines 1, .CountOfLines End With End Select Next VBComp End Sub Any ideas anyone? "Bob Phillips" wrote: Can't see you will get a programming solution. The security settings will have to be changed by the user, if they can, or by an administrator. -- HTH Bob Phillips "George J" <George wrote in message ... I had this macro that worked in XL97. Our IT department just upgraded everyone to XL2002 . Sub MakeLibrary() On Error Resume Next 'if it already exits ThisWorkbook.VBProject.References _ .AddFromGuid "{0002E157-0000-0000-C000-000000000046}", 5, 0 'This adds the VBA Extensibility library reference End Sub Can anyone tell me how i get the reference to activate via code now? (Microsoft Visual Basic for Applications Extensibility 5.3) I've done a bit of reading on this and i think it requires a change in the security settings. Any way to do this via programming? - Never used anything but XL97 so i'm a bit lost now. As there will be a number of users who know nothing of excel using this, really need a coded workaround. thanks George |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VB Extensibility library and "late binding" | Excel Discussion (Misc queries) | |||
Lost VBA extensibility library reference | Excel Programming | |||
VBA extensibility library for deleting forms, modules, code etc... | Excel Programming | |||
VBA extensibility Library | Excel Programming | |||
VBA extensibility library for deleting forms, modules, code etc... | Excel Programming |