Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim VBComp As VBIDE.VBComponent
I am getting the "user-defined type not defined" error message on this line:
Dim VBComp As VBIDE.VBComponent I thought I had worked around it but, when the modules were imported, they only contained jibberish so obviously I need this line. Can anyone tell me what is missing? -- Best wishes, Jim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim VBComp As VBIDE.VBComponent
You need to add a reference to "Microsoft Visual Basic For
Applications Extensibility" (in the VBA window, select Tools/References and set the check box for this). Andrew Jim Jackson wrote: I am getting the "user-defined type not defined" error message on this line: Dim VBComp As VBIDE.VBComponent I thought I had worked around it but, when the modules were imported, they only contained jibberish so obviously I need this line. Can anyone tell me what is missing? -- Best wishes, Jim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim VBComp As VBIDE.VBComponent
Thanks.
I will do that. I knew it had to be something simple. -- Best wishes, Jim "Andrew Taylor" wrote: You need to add a reference to "Microsoft Visual Basic For Applications Extensibility" (in the VBA window, select Tools/References and set the check box for this). Andrew Jim Jackson wrote: I am getting the "user-defined type not defined" error message on this line: Dim VBComp As VBIDE.VBComponent I thought I had worked around it but, when the modules were imported, they only contained jibberish so obviously I need this line. Can anyone tell me what is missing? -- Best wishes, Jim |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim VBComp As VBIDE.VBComponent
I've avoided having to add reference with:
Dim VBComp As Object -- David?B?SmltIEphY2tzb24=?= wrote I am getting the "user-defined type not defined" error message on this line: Dim VBComp As VBIDE.VBComponent I thought I had worked around it but, when the modules were imported, they only contained jibberish so obviously I need this line. Can anyone tell me what is missing? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim VBComp As VBIDE.VBComponent
After further investigation, I found that a later line's absence caused the
jibberish. Now I am having trouble getting the routine to pass to the next file in the directory. What seemed to work earlier now gets an error message "Invalid procedure call or argument". I am using these two lines w = Dir("H:\*.xls") ' sets the path 'check for modules and export/import - close the first workbook w = Dir() ' Is supposed to cause the choosing of the next file in the folder -- Best wishes, Jim "David" wrote: I've avoided having to add reference with: Dim VBComp As Object -- David?B?SmltIEphY2tzb24=?= wrote I am getting the "user-defined type not defined" error message on this line: Dim VBComp As VBIDE.VBComponent I thought I had worked around it but, when the modules were imported, they only contained jibberish so obviously I need this line. Can anyone tell me what is missing? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim VBComp As VBIDE.VBComponent
Sorry, but I can't help with that. Maybe someone else will jump in.
-- David=? Utf-8?B?SmltIEphY2tzb24=?= wrote After further investigation, I found that a later line's absence caused the jibberish. Now I am having trouble getting the routine to pass to the next file in the directory. What seemed to work earlier now gets an error message "Invalid procedure call or argument". I am using these two lines w = Dir("H:\*.xls") ' sets the path 'check for modules and export/import - close the first workbook w = Dir() ' Is supposed to cause the choosing of the next file in the folder |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim VBComp As VBIDE.VBComponent
You don't say which line gets flagged - I presume it's one
of the calls to Dir. Messages like "Invalid procedure call or argument" on standard functions are usually caused by missing references: go to Tools/References again and see if there are any references marked as "MISSING". Andrew Jim Jackson wrote: After further investigation, I found that a later line's absence caused the jibberish. Now I am having trouble getting the routine to pass to the next file in the directory. What seemed to work earlier now gets an error message "Invalid procedure call or argument". I am using these two lines w = Dir("H:\*.xls") ' sets the path 'check for modules and export/import - close the first workbook w = Dir() ' Is supposed to cause the choosing of the next file in the folder -- Best wishes, Jim "David" wrote: I've avoided having to add reference with: Dim VBComp As Object -- David?B?SmltIEphY2tzb24=?= wrote I am getting the "user-defined type not defined" error message on this line: Dim VBComp As VBIDE.VBComponent I thought I had worked around it but, when the modules were imported, they only contained jibberish so obviously I need this line. Can anyone tell me what is missing? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBIDE.VBComponent | Excel Discussion (Misc queries) | |||
Programatically Unlocking a Project in the VBIDE | Excel Programming | |||
Late binding with VBIDE | Excel Programming | |||
VBComponent Types | Excel Programming | |||
can the VBIDE have its own macros? | Excel Programming |