Class Module

Microsoft OFFICE

    Sponsored Links


  • 1. Removing table autoformatting - Isn't this group monitored?
    I was under the impression that paid MS employees monitor these groups and help MSDN subscribers who post here. Was I mistaken? I wrote: > Hello, > > Assume there is a table in a document with AutoFormat properties applied. > > Can I remove the AutoFormat properties without changing the table's current appearance > (basically "freezing" the table's current format)? > > Thanks. Best regards, Alex. -- Address email to user "response" at domain "alexoren" with suffix "com"
  • 2. Controlling menus of hosted MS-Word
    Hello people, I can easily manipulate the MS-Word menu items using Application.CommandBars.ActiveMenuBar.Controls. It works without problems both from COM add-ins and VBA macros. However, if the Word window is hosted in another application it no longer works. Try it yourself: 1) Open a Word document in Internet Explorer 2) display Application.CommandBars.ActiveMenuBar.Controls(1).Caption You get "&File", which is the first menu item. 3) Application.CommandBars.ActiveMenuBar.Controls(1).Delete Notice that the menu in IE did not change. 4) Sanity check: display Application.CommandBars.ActiveMenuBar.Controls(1).Caption again Now it is "&Edit", the 2nd menu item. So Word thinks that the menu item has been deleted but IE does not know anything about it! Same problem trying to add, enable/disable or show/hide menu items. No effect. Zilch. Nada. Here's what I am trying to do: I have a Word add-in written in C# that inserts its own menus. Some times I need to disable (or hide) them based on the current state of the document. Unfortunately, if the Word window is hosted in another application (IE, DsoFramer, you name it) it does not work. Any help is appreciated! Thanks, Alex. -- Address email to user "response" at domain "alexoren" with suffix "com"
  • 3. Opening file with changing monthly date extension
    Each day, a new file is created and named with a date extension. I would like my macro to open the last day's file from the previous month (20060531_Volume). My problem is that, every month, this would change (due to the date extension) and that every month the location of the file I want to open changes as our system creates a new folder for each month as the month is finished. This would mean 20060430_Volume would be in the 200604 Folder, 20060531_Volume would be in the 200605 Folder and so on. I would like the macro to work so that every month it would open the correct file without me changing anything in the macro. Is this possible? Any help would be greatly appreciated.

Class Module

Postby can » Tue, 12 Aug 2003 23:32:03 GMT

ich hg grad an nem problem und hoffe hier kann mir vielleicht jemand
helfen? ich hoffe es zumindest sehr ;)

ich hab in meiner ein paar KlassenModule die ich jetzt von einem
anderen dokument aus verwenden will!

jetzt will ich in der Datei B das Class Modul Habla laden!
Sag Dim xyz As New Habla

da es ein classenmodul von der ist sollte er das doch aufrufen
er sagt mir allerding weiterhin: User-defined type not defined


The type you want to declare is in another module but has been declared

. modul ist public..


The type is a valid type, but the object library or type library in which it
is defined isn't registered in Visual Basic.

ist das auch f Class aufrufe nig? (habs mal gemacht:)

. References -> TemplateProject..

-> Name conflicts with existing module, project, or object library

hm.. okey.. dann ists anscheinend schon drin?

Ich hab die betreffende klasse markiert und im Properties window Instancing
von Private auf PublicNotCreatable (was ist das? wieso nicht nur public?)
gesetzt.. bringt mich auch nich weiter..

hat jemand eine idee??

Re: Class Module

Postby Cindy Meister -WordMVP- » Thu, 14 Aug 2003 00:30:06 GMT

CAN has received an answer in a German-speaking VBA 

    Cindy Meister

Similar Threads:

1.Difference between Form's Class Module and Class Module

2.Class modules: parametrize class object fields

My question concerns class object fields.
To be more specific, let assume I defined an object "myclass" and an 
instance "myobj".
Set myobj = New myclass
Let assume too that this object has 2 fields: "myfld1" and "myfld2".
In other respects, I have a string variable {stfld} that is equal either to 
"myfld1" or to "myfld2".
Is it possible to get the value of  myobj(stfld), with a syntax similar to 
DAO with Access ?
I know that the previous syntax doesn't work, so my question is : does it 
exist an indirect (roundabout) way to do it ?
Thanks for your help.

Jean-Pierre Bidon
5 place de la Rublique
75003   Paris
T: 01 45 49 19 17 

3.Module vs Class Module

Are there any performance or memory-usage benefits of placing public
functions and subroutines in a Class Module rather than a standard

4.Replacing Forms, Modules, And Class Modules From Code

I have a large Visio Application that sometimes needs bug fixes or 
enhancements.  Is there a way, using for example VB, that I could open the 
Visio Application, delete a module or form, and then import the new object?



5.Passing Structure from VB front end(module) to class module without having the reference of the class module.


Can anyone help me to pass struncture from a visual basic front end (module)
to a class module withour having the reference of the DLL.

'-The Structure that I use:
Public Type pbltypePricingError
   svErrcode As String
   svErrMessage As String
   lvSuccess As Boolean
   svKey As String
End Type

'-Instance of the structure
Public pbltypError As pbltypePricingError

'-Creating an instance for the class module
Public clsPricing As Object

Set clsPricing = CreateObject("Pricing")

'Calling a public function in the class module, by passing the structure
pblfComputePrice = clsPricing.pblfComputePrice(X, Y, pbltypError)

Error message that I get: "Only public user defined types defined in public
object modules can be used as parameters or return types for public
procedures of class modules or as fields of public user defined types"

FYI - This structure is defined as public both in the class module and in
the module used by the front end.

Thanks and Regards,



7. Public Variables, Class Modules and Standard Modules

8. Class Modules vs Modules

Return to Microsoft OFFICE


Who is online

Users browsing this forum: No registered users and 60 guest