Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Unload A Form based on a Variable in my Module

How do I unload a hidden Userform when a condition in my module
becomes true?
Say, when AllDone = 1?

I'm new to this, please forgive if this is a dumb question.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Unload A Form based on a Variable in my Module

Something has to change the value of AllDone at some point in the module. You
have to test the value at each point where the value changes.

if AllDone = 1 then Unload(Userform1)

A variable changing state does not generate an event.

--
HTH...

Jim Thomlinson


" wrote:

How do I unload a hidden Userform when a condition in my module
becomes true?
Say, when AllDone = 1?

I'm new to this, please forgive if this is a dumb question.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Unload A Form based on a Variable in my Module

Yeah, I tried that first! I get:
Run-time error '361': Can't Load or Unload this Object

I'm using an older excel, 97, is there a different syntax?


On May 2, 1:39 pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
Something has to change the value of AllDone at some point in the module. You
have to test the value at each point where the value changes.

if AllDone = 1 then Unload(Userform1)

A variable changing state does not generate an event.

--
HTH...

Jim Thomlinson



" wrote:
How do I unload a hidden Userform when a condition in my module
becomes true?
Say, when AllDone = 1?


I'm new to this, please forgive if this is a dumb question.- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Unload A Form based on a Variable in my Module

Try Jim's suggestion again but without the brackets
if AllDone = 1 then Unload Userform1

Although there are differences between XL97 and successive versions, there's
nothing in particular relating to what you appear to be doing.

Regards,
Peter T

wrote in message
oups.com...
Yeah, I tried that first! I get:
Run-time error '361': Can't Load or Unload this Object

I'm using an older excel, 97, is there a different syntax?


On May 2, 1:39 pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
Something has to change the value of AllDone at some point in the

module. You
have to test the value at each point where the value changes.

if AllDone = 1 then Unload(Userform1)

A variable changing state does not generate an event.

--
HTH...

Jim Thomlinson



" wrote:
How do I unload a hidden Userform when a condition in my module
becomes true?
Say, when AllDone = 1?


I'm new to this, please forgive if this is a dumb question.- Hide

quoted text -

- Show quoted text -





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Unload A Form based on a Variable in my Module

Fiddling around some more, I found the unload command works if I omit
the parentheses. Thank you for setting me down the right path...I had
been wondering if I needed some particular code in the userform or
something. Once I knew that Unload should work, I could focus my
debug efforts!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to unload a form Grd Excel Programming 3 March 20th 07 03:48 PM
Unload User Form Partho[_3_] Excel Programming 4 October 17th 06 04:21 AM
Unload the form on esc key Papou Excel Programming 0 August 10th 04 05:15 PM
form won't unload inquirer Excel Programming 1 May 26th 04 09:55 AM
Form Unload Khai[_2_] Excel Programming 0 August 4th 03 09:28 PM


All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"