[dba-VB] Importing VB6 cls file as Class Module in Access VBA

jwcolby jwcolby at colbyconsulting.com
Thu May 1 06:10:13 CDT 2008


Shamil,

If you notice the Exposed and creatable properties, it appears that he 
is trying to make the class viewable from outside of a library.  Just 
deleting those lines will prevent that.

He needs to do the Insert Class, Insert file thing.

John W. Colby
www.ColbyConsulting.com


Shamil Salakhetdinov wrote:
> Hi Borge,
> 
> Just remove these lines, which do not compile - those are attributes used
> internally by VB6: VBA has some similar attributes but you usually do not
> need to change them from within VBA's IDE....
> 
> --
> Shamil
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Borge Hansen
> Sent: Thursday, May 01, 2008 11:33 AM
> To: dba-vb at databaseadvisors.com; accessd at databaseadvisors.com
> Subject: [dba-VB] Importing VB6 cls file as Class Module in Access VBA
> 
> Hi there,
> 
> I am swimming in the deep end of the pool and threading water so to speak
> .... I need help!
> 
> I have imported a VB6 .cls file into VBA
> 
> The following shows up in red and will not compile
> 
> 'Will not compile :
> VERSION 1.0 CLASS
> 
>  Attribute VB_Name = "HTTPClass"
> Attribute VB_GlobalNameSpace = False
> Attribute VB_Creatable = True
> Attribute VB_PredeclaredId = False
> Attribute VB_Exposed = True
> 'End of lines not compiling
> 
> Here is the beginning of the module - it's the HTTPClass.cls from available
> from some VB6 website, can't remember the link right now ...;
> all other code lines appear ok in VBA
> 
> What do I need to do??
> 
> 
> 
> '**** Beginning of VBA Class Module ::
> Option Compare Database
> Option Explicit
> VERSION 1.0 CLASS
> BEGIN
>   MultiUse = -1  'True
>   Persistable = 0  'NotPersistable
>   DataBindingBehavior = 0  'vbNone
>   DataSourceBehavior = 0   'vbNone
>   MTSTransactionMode = 0   'NotAnMTSObject
> End
> Attribute VB_Name = "HTTPClass"
> Attribute VB_GlobalNameSpace = False
> Attribute VB_Creatable = True
> Attribute VB_PredeclaredId = False
> Attribute VB_Exposed = True
> 
> Public Enum ePort
>    INTERNET_DEFAULT_HTTP_PORT = 80
>    INTERNET_DEFAULT_HTTPS_PORT = 443
> End Enum
> ...
> 
> 
> Regards
> borge
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 



More information about the dba-VB mailing list