Solved

shared function in Visual Basic 6 (outlook macro)

Posted on 2007-03-19
3
164 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now