Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Static storage of variables??

2 views
Skip to first unread message

Marcel J. Leclerc

unread,
Nov 15, 2001, 12:32:24 PM11/15/01
to
Hello,

1. I have an application that launches another program with:

Private Sub YesButton_Click()
terminal.Hide
RetVal = Shell(strProgramname, 3)
Exit Sub
End Sub

The user has the option of updating "strProgramname". My question is
this: How do I store "strProgramname" such that its value does not
change between runs of my application? I realize that this may be more
of a general programming question than a VB issue but any help would be
appreciated. I have read about declaring a variable as "static" but
apparently this only maintains a value for the duration of the program
run.

2. A minor question. I have been unable to set the width of user forms
below 84. Is this normal? If I use, say, Controls.Width = 50 at run
time the width is set to 84 (?).


--
Best regards,

Marcel Leclerc
AMASS Data Technologies Inc
(819) 457-4926
FAX (819) 457-9802
amas...@amassdata.com
http://www.amassdata.com


John Walkenbach

unread,
Nov 15, 2001, 1:25:16 PM11/15/01
to
One way to do that is to store the data in the Windows registry. Fortunately, this is very easy with VBA. Check out the SaveSetting and GetSetting functions.

My web site has a simple example of these functions:

http://j-walk.com/ss/excel/tips/tip60.htm

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss


"Marcel J. Leclerc" <amas...@amassdata.com> wrote in message news:3BF3FC28...@amassdata.com...

Marcel J. Leclerc

unread,
Nov 15, 2001, 3:36:50 PM11/15/01
to
Thank you John. I learned something. That feels good.

Any idea on my second question with respect to sizing user forms?

Marcel

John Walkenbach

unread,
Nov 15, 2001, 4:50:41 PM11/15/01
to
As far as I can tell, the minimum width of a UserForm is 84. I haven't figured out a way around it.

Maybe you can use a custom toolbar instead?

-John

"Marcel J. Leclerc" <amas...@amassdata.com> wrote in message news:3BF42762...@amassdata.com...

0 new messages