LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default how to declare a class module

I've tried doing that but I always get the DLL entry point
not found error. Could never get around it. I also don't
want to worry about the DLL having to get published to
every PC. Classes in and XLA are embedded, right? Or is
there some other wayt to do the same with a DLL...embed it
into the XLA?


-----Original Message-----
Kevin,

Why not create a DLL mad add a reference in the calling

app?

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the Purbecks


"Kevin" wrote in message
...
Bob,
The methods to declaring a class in a different project
appear to be different. Can you offer the steps in

which
I might declare a class in one XLA so that it is visible
in the other XLA in a particular instance of Excel. For
example, I want to put all my Class Modules into it's

own
XLA so I can password it from the other developers on

the
team. I'm having trouble accessing the procedures in

the
other modules class <Object variable or With Block not
set.

Project 1 (Classes.xla) is loaded into Session X of

Excel
Project 2 (Program.xla) is loaded into Session X of

Excel

I want to access the 'Public Property Get LEISUserName'
from program.xla but I'm having no success. Any

thoughts?
-Kevin


-----Original Message-----
Kevin,

You don't say what is happening, and VB and VBA declare

class properties and
methods in a similar way.

One thing I note though. VBA does not have an App

object,
so you will get an
error on that. You will need to code the productname

in.

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the

Purbecks


"Kevin" wrote in message
...
I've been programming in VB6 for a while but it seems

that
how you declare the properties, methods, and events

of a
class module in Excel VBA is different.

I've declared several public properties in a a class
module. Now I want to set these properties from a

form
module. What am I doing wrong?

Code excerpt from Class Module (PGDSettings):
'LEIS User Name Start - Public
Public Property Get LEISUserName() As String
LEISUserName = GetSetting
(App.ProductName, "Settings", "LEISUUID")
End Property
Public Property Let LEISUserName(strLEISUserName As

String)
SaveSetting

App.ProductName, "Settings", "LEISUUID",
strLEISUserName
End Property
'LEIS User Name End

Code excerpt from Form Module:
Option Explicit
Public ps As New PGDSettings
Private Sub UserForm_Activate()
txtUuid.Text = ps.LEISUserName
End Sub


.



.



 
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
Creating UDF by Class Module (Leo)? Leo Excel Discussion (Misc queries) 1 December 2nd 08 10:59 AM
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
Chart Class Module/follow on question to hyperlink post earlier. Rominall Charts and Charting in Excel 2 March 7th 07 02:43 AM
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM


All times are GMT +1. The time now is 06:03 PM.

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

About Us

"It's about Microsoft Excel"