|
-
Nov 12th, 2000, 05:33 PM
#1
on my form load, i set a dimmed variable to the value of a public variable on another form:
Code:
Private Sub Form_Load()
newSize = frmMain.prefList(1)
End Sub
Then I change the value of newSize, and when I unload the form, I set the public variable to the value of the dimmed value:
Code:
Private Sub Form_Unload()
frmMain.prefList(1) = newSize
End Sub
but when I open the form back up, the value of frmMain.prefList(1) is unchanged, an idea why that could be??
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 12th, 2000, 05:39 PM
#2
Member
You declare public variables in a module.
-
Nov 12th, 2000, 05:41 PM
#3
actually, you can declare public variables on a form, you just have to reference them by the form on which they are declared, and as you can see, I have done that.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 12th, 2000, 06:08 PM
#4
transcendental analytic
do you have newsize declared?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 12th, 2000, 06:35 PM
#5
yes i do, and I placed one of those red dots on the "End Sub" line of the Form_Unload() sub. In the immediate widow, the value of frmMain.prefList(1) remains unchanged.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 13th, 2000, 09:12 AM
#6
transcendental analytic
Hmm, this could be a tricky one, can you send your projects and i'll have a look?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 13th, 2000, 09:32 AM
#7
Fanatic Member
hmm perhaps the form is unloading before the variable's value is passed? You could try placing that code in Form_QueryUnload and see if that works. I'd also set up a message box to kick off displaying newSize then frmMain.prefList(1) before the unload ... You may be able to pinpoint where and why it's dropping the value.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|