![]() |
i have some problem
i define an string variable, it use in module form, and initialic
there. when de form is unload, this variable loose the value, why? someone help me????? thanks.... -- Message posted from http://www.ExcelForum.com |
i have some problem
It all depends on how you called the variable. There are
four types, Dim, Public, Private and Static. You can also declare them either at procedure level or module level in the options section of the module (top of the module). Each retains the value for different times. Have a look under the help variables to see how each can be used. Static should retain the value between calls, whilst Dim defiend at procedure level looses its value when that procedure ends. Declaring a variable at module level as Public should retain the value after the form has closed. Make sure though that the variable is decalred in a module. Best of Luck DavidC -----Original Message----- i define an string variable, it use in module form, and initialice there. when de form is unload, this variable loose the value, why? someone help me????? thanks..... --- Message posted from http://www.ExcelForum.com/ . |
i have some problem
grabeva,
Read about "Scope" in the help. NickHK "grabeva " wrote in message ... i define an string variable, it use in module form, and initialice there. when de form is unload, this variable loose the value, why? someone help me????? thanks..... --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 08:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com