Author Topic: Var from command line to VBA routine  (Read 2632 times)

0 Members and 1 Guest are viewing this topic.

jura

  • Guest
Var from command line to VBA routine
« on: August 26, 2004, 07:49:37 AM »
Is it possible to transfer a var from a the commmand line to a simple VBA routine.

Here is what i want to do, this doesn't work, but should give you some idea.

Command line:
Code: [Select]

^C^C-vbarun QuadrantToggle(16)


VBA routine
Code: [Select]

Sub QuadrantToggle(VarName)
Dim VarName As Integer

'routine here

End Sub

SMadsen

  • Guest
Var from command line to VBA routine
« Reply #1 on: August 26, 2004, 08:03:45 AM »
I'm not really into menu macros but you could probably use VBASTMT. I can't get it to work directly but this seems to work:

^C^C(command "VBASTMT" "QuadrantToggle(16)");

jura

  • Guest
Var from command line to VBA routine
« Reply #2 on: August 26, 2004, 08:52:49 AM »
Works like a charm!!!!

Thx a lot.

This saves a lot of reprogramming. One routine can do so much more now.