D
Daniel Bonallack
I was given code some time ago for removing modules and forms from a file.
The code is shown below.
The weird thing is that this works fine on my machine, but not on any of my
colleagues. Can someone tell me why? Is there a setting I need to be aware
of?
On my colleagues' PCs, it gives an error on the first line.
Thanks
Daniel
Dim VBComp As Object
Dim vbMod As Object
For Each vbMod In ThisWorkbook.VBProject.VBComponents
ThisWorkbook.VBProject.VBComponents.Remove vbMod
Next vbMod
The code is shown below.
The weird thing is that this works fine on my machine, but not on any of my
colleagues. Can someone tell me why? Is there a setting I need to be aware
of?
On my colleagues' PCs, it gives an error on the first line.
Thanks
Daniel
Dim VBComp As Object
Dim vbMod As Object
For Each vbMod In ThisWorkbook.VBProject.VBComponents
ThisWorkbook.VBProject.VBComponents.Remove vbMod
Next vbMod