This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C37C52.E67B0410
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_000A_01C37C52.E67B0410"


------=_NextPart_001_000A_01C37C52.E67B0410
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

En blanco
Hi,

This answer is the "evolution" of my last question:

I still working in my template, the final part, but have a little final =
problem (little for masters, great for novices): I have a variable "A" =
in a UserForm1. That variable is a string, formed adding words filled in =
7 ComboBoxes. When I set "MsgBox A" at UserForm1 level, MsgBox display =
the correcti string. That string I want to use at final, to auto-set =
the name of the document. Well, the variable A have the right string at =
UserForm1 level. I declared variable A as public in the "Declaration, =
General" in the UserForm1, and the string is "formed" inside the "Public =
Sub CommandButton1_Click()" module. That module is inside the UserForm1.

At this point, everything allright. When I want to close the document, =
in "this document" part, I declare too variable A as Public, but the =
variable at this level es empty, have no string at all. If you, in that =
instance, set "MsgBox A", the message is empty, with no string at all. =
Then, I can=B4t use this string to set the document name. I can't =
understand because I've declared as public the A variable, and =
understand that this thing do it "visible" in all modules of the =
document. Is too evident that I'm no doing something too basic in that =
point, and some help will be great for me.

Regards,



Omar







------=_NextPart_001_000A_01C37C52.E67B0410
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE id=3DridTitle>En blanco</TITLE><BASE=20
href=3D"file://C:\Archivos de programa\Archivos comunes\Microsoft =
Shared\Stationery\">
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<STYLE>BODY {
MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; =
FONT-FAMILY: Arial, Helvetica
}
P.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =
FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; =
FONT-FAMILY: Helvetica, "Times New Roman"
}
</STYLE>

<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR></HEAD>
<BODY id=3DridBody bgColor=3D#ffffff=20
background=3Dcid:000401c37c6c$0bc5f220$d7f82bc8@mipcxt400>
<DIV><FONT face=3DTahoma color=3D#008080 size=3D4></FONT>&nbsp;</DIV>
<P align=3Djustify>Hi,</P>
<P align=3Djustify>This answer is the "evolution" of my last =
question:</P>
<P align=3Djustify>I still working in my template, the final part, but =
have a=20
little final problem (little for masters, great for novices): I have a =
variable=20
"A" in a UserForm1. That variable is a string, formed adding words =
filled in 7=20
ComboBoxes. When I set "MsgBox A" at UserForm1 level, MsgBox display =
the&nbsp;=20
correcti string. That string I want to use at final, to auto-set the =
name of the=20
document. Well, the variable A have the right string at UserForm1 level. =
I=20
declared variable A as public in the "Declaration, General" in the =
UserForm1,=20
and the string is "formed" inside the "Public Sub =
CommandButton1_Click()"=20
module. That module is inside the UserForm1.</P>
<P align=3Djustify>At this point, everything allright. When I want to =
close the=20
document, in "this document" part,&nbsp; I declare too variable A as =
Public, but=20
the variable at this level es empty, have no string at all. If you, in =
that=20
instance, set "MsgBox&nbsp; A", the message is empty, with no string at =
all.=20
Then, I can=B4t use this string to set the document name. I can't =
understand=20
because I've declared as public the A variable, and understand that this =
thing=20
do it "visible" in all modules of the document. Is too evident that I'm =
no doing=20
something too basic in that point, and some help will be great for =
me.</P>
<P align=3Djustify>Regards,</P>
<P align=3Djustify><FONT face=3DTahoma color=3D#008080 =
size=3D4></FONT>&nbsp;</P>
<P align=3Dcenter>Omar</P>
<P><FONT face=3DTahoma color=3D#008080 size=3D4></FONT>&nbsp;</P>
<P><FONT face=3DTahoma color=3D#008080 size=3D4></FONT>&nbsp;</P>
<P>&nbsp;</P></BODY></HTML>

------=_NextPart_001_000A_01C37C52.E67B0410--

------=_NextPart_000_0009_01C37C52.E67B0410
Content-Type: image/gif;
name="Fondo de En blanco.gif"
Content-Transfer-Encoding: base64
Content-ID: <000401c37c6c$0bc5f220$d7f82bc8@mipcxt400>

R0lGODlhLQAtAID/AP////f39ywAAAAALQAtAEACcAxup8vtvxKQsFon6d02898pGkgiYoCm6sq2
7iqWcmzOsmeXeA7uPJd5CYdD2g9oPF58ygqz+XhCG9JpJGmlYrPXGlfr/Yo/VW45e7amp2tou/lW
xo/zX513z+Vt+1n/tiX2pxP4NUhy2FM4xtjIUQAAOw==

------=_NextPart_000_0009_01C37C52.E67B0410--

Re: About a "invisible" variable by Jezebel

Jezebel
Tue Sep 16 17:51:47 CDT 2003

Start by reading Help on variable scope. Your variable is declared in
UserForm1, so it exists only as long as the form does. Making it public
means that the variable can be reference from outside the form, but only as
a property of the form:

MsgBox UserForm1.A

And the variable ceases to exist when you unload the form.

Your second declaration of a variable with the same name is creating a
second variable that is entirely independent.




"E. Omar Troccoli K." <eotk@hotmail.com> wrote in message
news:OQeKNwGfDHA.556@TK2MSFTNGP11.phx.gbl...
En blanco
Hi,

This answer is the "evolution" of my last question:

I still working in my template, the final part, but have a little final
problem (little for masters, great for novices): I have a variable "A" in a
UserForm1. That variable is a string, formed adding words filled in 7
ComboBoxes. When I set "MsgBox A" at UserForm1 level, MsgBox display the
correcti string. That string I want to use at final, to auto-set the name of
the document. Well, the variable A have the right string at UserForm1 level.
I declared variable A as public in the "Declaration, General" in the
UserForm1, and the string is "formed" inside the "Public Sub
CommandButton1_Click()" module. That module is inside the UserForm1.

At this point, everything allright. When I want to close the document, in
"this document" part, I declare too variable A as Public, but the variable
at this level es empty, have no string at all. If you, in that instance, set
"MsgBox A", the message is empty, with no string at all. Then, I can´t use
this string to set the document name. I can't understand because I've
declared as public the A variable, and understand that this thing do it
"visible" in all modules of the document. Is too evident that I'm no doing
something too basic in that point, and some help will be great for me.

Regards,



Omar









Re: About a "invisible" variable by Word

Word
Fri Sep 19 04:48:57 CDT 2003

G'day "E. Omar Troccoli K." <eotk@hotmail.com>,

Dim MyForm as UserForm1
Set MyForm = new userform1
with myform
.show
msgbox .a
end with
set myform=nothing

"E. Omar Troccoli K." <eotk@hotmail.com> was spinning this yarn:

>En blanco
>Hi,
>
>This answer is the "evolution" of my last question:
>
>I still working in my template, the final part, but have a little final problem (little for masters, great for novices): I have a variable "A" in a UserForm1. That variable is a string, formed adding words filled in 7 ComboBoxes. When I set "MsgBox A" at UserForm1 level, MsgBox display the correcti string. That string I want to use at final, to auto-set the name of the document. Well, the variable A have the right string at UserForm1 level. I declared variable A as public in the "Declaration, General" in the UserForm1, and the string is "formed" inside the "Public Sub CommandButton1_Click()" module. That module is inside the UserForm1.
>
>At this point, everything allright. When I want to close the document, in "this document" part, I declare too variable A as Public, but the variable at this level es empty, have no string at all. If you, in that instance, set "MsgBox A", the message is empty, with no string at all. Then, I can´t use this string to set the document name. I can't understand because I've declared as public the A variable, and understand that this thing do it "visible" in all modules of the document. Is too evident that I'm no doing something too basic in that point, and some help will be great for me.
>
>Regards,
>
>
>
>Omar
>
>
>
>
>

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email steve@wordheretic.com
Products http://www.geocities.com/word_heretic/products.html

Replies offlist may require payment.