Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
user defined type not defined ??
with downloaded code (from chip pearson's site) to remove all of the code
behind a worksheet, I've added this code which on the first line, returns this error "user defined type not defined" (the code is located in an command button click event, and behind a (different) sheet which is where the command button exists.) error is on this line -- Dim VBCodeMod As CodeModule Dim StartLine As Long Dim HowManyLines As Long Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("NewModule").C odeModule With VBCodeMod StartLine = 1 HowManyLines = .CountOfLines .DeleteLines StartLine, HowManyLines End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
user defined type not defined ??
As it says at the top of the page, you need to create a reference to the
Extensibility Library. -- Regards, Tom Ogilvy "mark kubicki" wrote in message ... with downloaded code (from chip pearson's site) to remove all of the code behind a worksheet, I've added this code which on the first line, returns this error "user defined type not defined" (the code is located in an command button click event, and behind a (different) sheet which is where the command button exists.) error is on this line -- Dim VBCodeMod As CodeModule Dim StartLine As Long Dim HowManyLines As Long Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("NewModule").C odeModule With VBCodeMod StartLine = 1 HowManyLines = .CountOfLines .DeleteLines StartLine, HowManyLines End With |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
user defined type not defined ??
or just declare it as Object not CodeModule.
-- HTH RP (remove nothere from the email address if mailing direct) "Tom Ogilvy" wrote in message ... As it says at the top of the page, you need to create a reference to the Extensibility Library. -- Regards, Tom Ogilvy "mark kubicki" wrote in message ... with downloaded code (from chip pearson's site) to remove all of the code behind a worksheet, I've added this code which on the first line, returns this error "user defined type not defined" (the code is located in an command button click event, and behind a (different) sheet which is where the command button exists.) error is on this line -- Dim VBCodeMod As CodeModule Dim StartLine As Long Dim HowManyLines As Long Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("NewModule").C odeModule With VBCodeMod StartLine = 1 HowManyLines = .CountOfLines .DeleteLines StartLine, HowManyLines End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"User-defined type not defined" message in Excel | Excel Discussion (Misc queries) | |||
Workspace faux user-defined type not defined | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
User Defined type not defined | Excel Programming | |||
Word.Document - user defined type not defined | Excel Programming |