TheSwamp

Code Red => VB(A) => Topic started by: jura on August 26, 2004, 07:49:37 AM

Title: Var from command line to VBA routine
Post by: jura 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
Title: Var from command line to VBA routine
Post by: SMadsen 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)");
Title: Var from command line to VBA routine
Post by: jura 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.