Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default couple userform questions

1) when the close(x) closes a form, does it create any kind of event to act on?

2) let's say you use a form as a main menu. clicking a command button loads a
submenu, so you either hide or unload the main menu.
the operation the 2nd command button launches takes x amount of time.
how can you load the main menu after the operation is completed?

--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default couple userform questions

Hi Gary,

Perhaps you can use SaveSetting function ... like :

Dim r
Private Sub UserForm_Activate()
r = GetSetting("App", "Sect", "Ky")
If r = "" Then
r = 0
Exit Sub
Else
MsgBox "You've closed " & r & " times!"
End If
End Sub

Private Sub UserForm_Terminate()
SaveSetting "App", "Sect", "Ky", Val(r) + 1
End Sub

Rgds,

Halim




Gary Keramidas menuliskan:
1) when the close(x) closes a form, does it create any kind of event to act on?

2) let's say you use a form as a main menu. clicking a command button loads a
submenu, so you either hide or unload the main menu.
the operation the 2nd command button launches takes x amount of time.
how can you load the main menu after the operation is completed?

--


Gary


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default couple userform questions

Bob explained the theory. I told you to try it and I guess you didn't. Many
people refuse to try a solution they don't immediately understand. That is
not a good approach. Most solutions to anything are complicated and
illogical, but they work anyway.

Best wishes Harald

"Harald Staff" skrev i melding
...
Hi Gary


Try the X on userform1.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default couple userform questions

harald:

i did try it. i know you know a lot more than i'll ever know. what i was looking
for was a simple, built in way. i thought there may be a method i didn't know
about. why isn't there a built in option, just like show, hide, activate? every
userform has an x,
figured if the x was clicked, the userform was closed and it could be acted on
without writing code
to do it.




--


Gary


"Harald Staff" wrote in message
...
Bob explained the theory. I told you to try it and I guess you didn't. Many
people refuse to try a solution they don't immediately understand. That is
not a good approach. Most solutions to anything are complicated and
illogical, but they work anyway.

Best wishes Harald

"Harald Staff" skrev i melding
...
Hi Gary


Try the X on userform1.







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default couple userform questions

Gary

The problem is that when the x is clicked, the form is unloaded, so there is
nothing to test against. Therefore you have to trap the close event, which
is what Query Close gives you.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
harald:

i did try it. i know you know a lot more than i'll ever know. what i was

looking
for was a simple, built in way. i thought there may be a method i didn't

know
about. why isn't there a built in option, just like show, hide, activate?

every
userform has an x,
figured if the x was clicked, the userform was closed and it could be

acted on
without writing code
to do it.




--


Gary


"Harald Staff" wrote in message
...
Bob explained the theory. I told you to try it and I guess you didn't.

Many
people refuse to try a solution they don't immediately understand. That

is
not a good approach. Most solutions to anything are complicated and
illogical, but they work anyway.

Best wishes Harald

"Harald Staff" skrev i melding
...
Hi Gary


Try the X on userform1.











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default couple userform questions

thanks for the explanation. as i mentioned, i don't know near as much as you
guys do.

--


Gary


"Bob Phillips" wrote in message
...
Gary

The problem is that when the x is clicked, the form is unloaded, so there is
nothing to test against. Therefore you have to trap the close event, which
is what Query Close gives you.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
harald:

i did try it. i know you know a lot more than i'll ever know. what i was

looking
for was a simple, built in way. i thought there may be a method i didn't

know
about. why isn't there a built in option, just like show, hide, activate?

every
userform has an x,
figured if the x was clicked, the userform was closed and it could be

acted on
without writing code
to do it.




--


Gary


"Harald Staff" wrote in message
...
Bob explained the theory. I told you to try it and I guess you didn't.

Many
people refuse to try a solution they don't immediately understand. That

is
not a good approach. Most solutions to anything are complicated and
illogical, but they work anyway.

Best wishes Harald

"Harald Staff" skrev i melding
...
Hi Gary

Try the X on userform1.










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default couple userform questions

Hi Gary

Glad it worked out in the end.
I wasn't trying to be smart or rude, I just believed my demo was simple and
to the point. Apologies if it wasn't so.

Best wishes Harald

"Gary Keramidas" <GKeramidasATmsn.com skrev i melding
...
thanks for the explanation. as i mentioned, i don't know near as much as

you
guys do.

--


Gary



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
couple of questions cjbarron5 Excel Discussion (Misc queries) 10 June 2nd 08 01:46 AM
Couple of Questions Need Help Please..... Jeremy Excel Discussion (Misc queries) 0 February 8th 08 06:11 PM
A couple of questions [email protected] Excel Discussion (Misc queries) 3 November 22nd 06 03:39 AM
A couple of questions... littlegreenmen1 Excel Discussion (Misc queries) 0 June 10th 05 09:40 PM
A couple of questions Terry von Gease Excel Programming 3 August 16th 03 09:09 PM


All times are GMT +1. The time now is 12:18 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"