ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform.Activate (https://www.excelbanter.com/excel-programming/277052-userform-activate.html)

neil

Userform.Activate
 
Hi all, Firstly thanks to everyone who has answered my
questions of the last few days !!!

I have a userform that has some code in the activate
event, this looks at a value in sheet1.range("A1") and
uses this to scan along a data table and fill in some
textboxes, this all works fine, but when i use the
userfrom1.hide option, then change the value on sheet 1,
then use userfrom1.show again, it appears to be still
using the old value, is this becase Im not really
unloading the form but simply hiding it from view ? if so
whats the correct way to unload the form so that it
clears the data from the form.activate event ?



John Wilson

Userform.Activate
 
Neil,

Unload UserForm1

John

Neil wrote:

Hi all, Firstly thanks to everyone who has answered my
questions of the last few days !!!

I have a userform that has some code in the activate
event, this looks at a value in sheet1.range("A1") and
uses this to scan along a data table and fill in some
textboxes, this all works fine, but when i use the
userfrom1.hide option, then change the value on sheet 1,
then use userfrom1.show again, it appears to be still
using the old value, is this becase Im not really
unloading the form but simply hiding it from view ? if so
whats the correct way to unload the form so that it
clears the data from the form.activate event ?



Ron de Bruin

Userform.Activate
 
Use this to unload the userform

Unload userform1



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Neil" wrote in message ...
Hi all, Firstly thanks to everyone who has answered my
questions of the last few days !!!

I have a userform that has some code in the activate
event, this looks at a value in sheet1.range("A1") and
uses this to scan along a data table and fill in some
textboxes, this all works fine, but when i use the
userfrom1.hide option, then change the value on sheet 1,
then use userfrom1.show again, it appears to be still
using the old value, is this becase Im not really
unloading the form but simply hiding it from view ? if so
whats the correct way to unload the form so that it
clears the data from the form.activate event ?






All times are GMT +1. The time now is 10:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com