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 |
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 |
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 |
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? |
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? |
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 |
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? |
All times are GMT +1. The time now is 07:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com