C
chfa
Hi u,
the task is as following :
When User Form1 (UF1) is called, it checks for a value in a Sheet. If
the value isn't set UF1 croaks and sets a flag to be passed to a
UserForm (UF2) where the value is to be set.
Searching 4 the solution I found Public Properties the most suitable
way solving my task. But i didn't got the string yet. In UF2 the
flagRogue keeps empty.
Due to what I found I tried following:
in: UF1
'---------------
private flagRogue as string
publicproperty get flagStatus() as String
flagStatus = flagCroak
end property
publicproperty let flagStatus(byval flagVal as String)
flagStatus = flagRogue
end property
'--------------
' Initialize:
dim wannaSthg as new UF2
...
if <no Value> Then
<croak>
flagRogue = 1
wannaSthg.flagRogue = Me.flagRogue
wannaSthg.Show
end if
in UF2
'-------------
private flagRogue as string
publicproperty get flagStatus() as String
flagStatus = flagCroak
end property
publicproperty let flagStatus(byval flagVal as String)
flagStatus = flagRogue
end property
'--------------
' Initialize:
dim wannaSthg as new UF2
...
if flagRogue Then
<do something>
else
<do something else>
end if
Question:
Where I'm wrong ???
thanx 4 helping
VBR
the task is as following :
When User Form1 (UF1) is called, it checks for a value in a Sheet. If
the value isn't set UF1 croaks and sets a flag to be passed to a
UserForm (UF2) where the value is to be set.
Searching 4 the solution I found Public Properties the most suitable
way solving my task. But i didn't got the string yet. In UF2 the
flagRogue keeps empty.
Due to what I found I tried following:
in: UF1
'---------------
private flagRogue as string
publicproperty get flagStatus() as String
flagStatus = flagCroak
end property
publicproperty let flagStatus(byval flagVal as String)
flagStatus = flagRogue
end property
'--------------
' Initialize:
dim wannaSthg as new UF2
...
if <no Value> Then
<croak>
flagRogue = 1
wannaSthg.flagRogue = Me.flagRogue
wannaSthg.Show
end if
in UF2
'-------------
private flagRogue as string
publicproperty get flagStatus() as String
flagStatus = flagCroak
end property
publicproperty let flagStatus(byval flagVal as String)
flagStatus = flagRogue
end property
'--------------
' Initialize:
dim wannaSthg as new UF2
...
if flagRogue Then
<do something>
else
<do something else>
end if
Question:
Where I'm wrong ???
thanx 4 helping
VBR