Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change public VBA variable from VBScript in an Outlook custom form

Status
Not open for further replies.

blink416

Technical User
Mar 22, 2005
20
GB
Hello !

Here's the problem : how do i set the value of a variable that i have defined as a public variable in VBA in MS Outlook 2007 main project1 class, how do i set the value of that variable in VBScript that is placed in a custom form in Outlook ?

e.g.
in Outlook main project1 class :
Public iwanttobeeverywhere As Variant
in VBScript in a custom appointments form :
[ how do i refer to the defined variable above ] = "icanbeeverywhere"

Thanx ahead !


p.s. it would be useful to know if it is possible to also call a public VBA function from VBScript like that ?
 
blink416,
If your variable is trully in a class module you should create a propery procedure to expose the variable to 'the world' then you should be able to:
Code:
[Outlook Object].[Class Object].[i]NewProperty[/i] = "icanbeeverywhere"

If your variable is in a standard module:
Code:
[Outlook Object].[i]Module1[/i].iwanttobeeverywhere = "icanbeeverywhere"

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top