Solved

shared function in Visual Basic 6 (outlook macro)

Posted on 2007-03-19
3
167 Views
Last Modified: 2012-06-21
Hi there,

I am writing an outlook macro in Visual Basic 6 and I apparently can't make a shared function. I've createrd a class module in my project and when I write in it, for example, the single line

Private shared function hello()

I get a compilation error just after pressing "Enter" :
   compilation Error :
   Expected : identifier

What's wrong with the word "shared" ?

Thx
0
Comment
Question by:B_B_Boris
  • 2
3 Comments
 
LVL 26

Expert Comment

by:EDDYKT
ID: 18747174
don't think vb6 support shared
0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 500 total points
ID: 18747183
you can use

public function hello()
0
 

Author Comment

by:B_B_Boris
ID: 18749074
I've got to do without shared stuff then ...

Thx for your message anyway
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question