Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
Workspace faux user-defined type not defined Chris S[_2_] Excel Programming 3 November 11th 04 05:51 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
User Defined type not defined Karpagam Excel Programming 1 May 16th 04 05:41 PM
Word.Document - user defined type not defined jowatkins[_7_] Excel Programming 0 January 20th 04 08:46 AM


All times are GMT +1. The time now is 09:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"