Passing VBS variable to Macro Scheduler

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
garycee
Newbie
Posts: 17
Joined: Mon Jul 20, 2015 7:17 pm

Passing VBS variable to Macro Scheduler

Post by garycee » Wed May 08, 2019 7:34 pm

Hi. I am writing a macro that includes VBS. However, I need to use the output as a variable from the VBS code and I can't work out how to do it.

Code: Select all

VBStart

Function IsFolderEmpty (ParemATT)
Dim objFSO, objFolder, objNoContent

MsgBox ParemATT

End Function
VBEND

VBEval>IsFolderEmpty(1),ParemATT

MessageModal>%ParemATT%
The goal was to output a simple 1.
Of course my final code would be more complex but I cant work this part out.

The MessageModal is just printing the variable name so I presume it's not setting it.

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Passing VBS variable to Macro Scheduler

Post by JRL » Wed May 08, 2019 8:29 pm

Code: Select all

VBStart
Function IsFolderEmpty (ParemATT)
Dim objFSO, objFolder, objNoContent

'  MsgBox ParemATT



'  Set the function name to the result
IsFolderEmpty = ParemATT



End Function
VBEND
VBEval>IsFolderEmpty(1),Parem
MessageModal>%Parem%

garycee
Newbie
Posts: 17
Joined: Mon Jul 20, 2015 7:17 pm

Re: Passing VBS variable to Macro Scheduler

Post by garycee » Wed May 08, 2019 10:17 pm

Thanks, buddy. Got to love this forum and the software.

Macro Scheduler forever! :)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts