H
hshayh0rn
I'm working with EXCEL 2003 and I'm trying to use the following code:
Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim HowManyLines As Long
Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("Startup").CodeModule
With VBCodeMod
StartLine = 1
HowManyLines = .CountOfLines
.DeleteLines StartLine, HowManyLines
End With
When it runs I get the following error:
Compile Error - User -defined type not defined
I have checked to be sure that under tools-macros-security and trusted
publishers that both the check boxes are checked which I've seen in other
posts could be an issue. So, does anyone know what the issue might be related
to the error?
Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim HowManyLines As Long
Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("Startup").CodeModule
With VBCodeMod
StartLine = 1
HowManyLines = .CountOfLines
.DeleteLines StartLine, HowManyLines
End With
When it runs I get the following error:
Compile Error - User -defined type not defined
I have checked to be sure that under tools-macros-security and trusted
publishers that both the check boxes are checked which I've seen in other
posts could be an issue. So, does anyone know what the issue might be related
to the error?