PC Review


Reply
Thread Tools Rate Thread

calling class modules

 
 
=?Utf-8?B?TWlza2FjZWU=?=
Guest
Posts: n/a
 
      11th Apr 2006
I have several class modules created from selecting modules on the menu. I
need to now link them up. I don't quite understand how to call them without
having them linked to a command button.
I am pulling several queries and sending them via lotus notes to various
departments. I have the procedures created for the various locations (a
module for each location - which isn't correct but this is the only way I
know how to accomplish this task). I plan on having the queries retrieved
and mailed on a monthly basis via a task scheduler but can't 'link' up all of
the modules I've created. I think I'm asking how can I call one module
inside of another????

Thanks for any help!
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      12th Apr 2006
For class module - you have first to instantiate it, and then call public
method or property

dim o as MyClass
set o = new MyClass
o.RunSomething

o.SomeProperty = 1

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


"Miskacee" <(E-Mail Removed)> wrote in message
news:2F7C05E4-65AC-4B1B-A00D-(E-Mail Removed)...
>I have several class modules created from selecting modules on the menu. I
> need to now link them up. I don't quite understand how to call them
> without
> having them linked to a command button.
> I am pulling several queries and sending them via lotus notes to various
> departments. I have the procedures created for the various locations (a
> module for each location - which isn't correct but this is the only way I
> know how to accomplish this task). I plan on having the queries retrieved
> and mailed on a monthly basis via a task scheduler but can't 'link' up all
> of
> the modules I've created. I think I'm asking how can I call one module
> inside of another????
>
> Thanks for any help!


 
Reply With Quote
 
=?Utf-8?B?TWlza2FjZWU=?=
Guest
Posts: n/a
 
      12th Apr 2006
Thanks for this information. More questions, I am first transfering various
spreadsheet to a server location. Currently, this is performed by clicking
on a button.
My code is as follows:
Private Sub cmd_MFN_Click()

Dim notesdb As Object
Dim notesdoc As Object
Dim notesrtf As Object
Dim notessession As Object

Dim strmanager As String

'Dim strCurrentPath As String

Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.GetDatabase("", "")

'email address
strmanager = "(E-Mail Removed)"
strCurrentPath = "\\bgnhss2kfs02\cchr\monthly exports\mfn.xls"
Call notesdb.OPENMAIL

Rem make new mail message
Set notesdoc = notesdb.CreateDocument
'DoCmd.OutputTo acOutputQuery, "qry_monthly_mfn", acFormatXLS, "mfn.xls"

Call notesdoc.ReplaceItemValue("Sendto", strmanager)
Call notesdoc.ReplaceItemValue("Subject", "Monthly Employee Report")
Set notesrtf = notesdoc.CreateRichTextItem("body")

Rem attach Error Report doc
s = ActiveDocument.Path + "\" + ActiveDocument.Name
Call notesrtf.EmbedObject(1454, "", strCurrentPath, "mail.rtf")

Rem send message
Call notesdoc.Send(False)
Set notessession = Nothing
End Sub
------
My question: I have several different spreadsheets going to different
people. Can't I revise this procedure to address all spreadsheets/emails
which are all different in this procedure somehow? This is my question. I'm
not certain how to call one spreadsheet transfer sent to one email address
for several spreadsheets/email addresses. Hope that makes sense.
My end result for accomplishing this is to call all of those
spreadsheets/emails on a monthly basis and have these reports sent
automatically to various locations.

Thanks once again. I not used Lotus Notes for an email so I'm having a hard
time trying to figure this one out.

"Alex Dybenko" wrote:

> For class module - you have first to instantiate it, and then call public
> method or property
>
> dim o as MyClass
> set o = new MyClass
> o.RunSomething
>
> o.SomeProperty = 1
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
>
> "Miskacee" <(E-Mail Removed)> wrote in message
> news:2F7C05E4-65AC-4B1B-A00D-(E-Mail Removed)...
> >I have several class modules created from selecting modules on the menu. I
> > need to now link them up. I don't quite understand how to call them
> > without
> > having them linked to a command button.
> > I am pulling several queries and sending them via lotus notes to various
> > departments. I have the procedures created for the various locations (a
> > module for each location - which isn't correct but this is the only way I
> > know how to accomplish this task). I plan on having the queries retrieved
> > and mailed on a monthly basis via a task scheduler but can't 'link' up all
> > of
> > the modules I've created. I think I'm asking how can I call one module
> > inside of another????
> >
> > Thanks for any help!

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
class modules versus modules Matt S Microsoft Excel Programming 1 12th Apr 2010 09:31 PM
Public Variables, Class Modules and Standard Modules Excel Monkey Microsoft Excel Programming 2 30th Apr 2009 03:18 PM
Class modules: parametrize class object fields Jean-Pierre Bidon Microsoft Excel Programming 11 31st Aug 2006 02:49 PM
Calling subroutines from Class Modules davidm Microsoft Excel Programming 1 23rd Feb 2006 03:42 AM
Basic question - modules and class modules - what's the difference? Mark Stephens Microsoft Excel Programming 9 8th May 2005 11:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.