Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 1st, 2004, 06:29 AM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Expandable Variables

Dear All,

Here's a quick one:

I was trying to pass parameters to this script file in VBA code :

Shell "\\lvamfs01\advent\Axys\Axys32.Exe script testappend3.scr batchpassvalue -exit"

where the batchpassvalue variable has the value "mts" stored in it; but what happens is that when the code is executed instead of the value stored in batchpassvalue getting passed , it itself gets passed as the value. I have tried combinations with batchpassvalue like

%batchpassvalue%
&batchpassvalue&

but the whole thing gets passed as the value itself.

Is there a way through which we can pass the value stored in batchpassvalue or any other variable, instead of it itself getting passed ?

Cheers
Goels


 
Old October 1st, 2004, 02:36 PM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear All,

I found out the way in which one can acheive the desired functionality. Posting the answer here as it might be of some help to any viewer:

Shell ("\\lvamfs01\advent\Axys\Axys32.Exe script testappend3.scr " & batchpassvalue & " -exit")

It was just a matter of getting the right syntax in place; which believe me as one new to programming i am finding notoriously difficult.

Cheers
Goels






Similar Threads
Thread Thread Starter Forum Replies Last Post
variables daniel.mihalcea Javascript 1 September 9th, 2008 07:06 PM
Need help to create expandable menu using tiles cheeky Java GUI 0 April 25th, 2007 03:14 AM
using variables webgrphx Classic ASP Basics 3 April 11th, 2007 06:46 PM
Missing 'Expandable' property of TreeNode Cezar Mart General .NET 1 March 11th, 2005 10:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.