Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting VBA code
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").Cod eModule 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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting row using vb code? | Excel Discussion (Misc queries) | |||
VBA Code for Deleting a Row | Excel Worksheet Functions | |||
Deleting Code from VBA | Excel Discussion (Misc queries) | |||
Another code for deleting row | Excel Programming | |||
Deleting code in a file with code.. | Excel Programming |