Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How do I hide the form?

I have a form, "form a" which is called by a Function in a Sub, "Sub1".
I also have a form, "form b", called by a Sub, "Sub2".

"form b" calls "Sub1" which, in turn, calls "form a." After I unload "form
a," "form b" comes to the front and "form a" remains visible in back of "form
b". I want "form a" to diappear after it is unloaded. How do I do this?

ShowModal is true for both forms.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How do I hide the form?

Do you really unload it, or just re-show the other? If you unload it, it
should go.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Andy Dorph" wrote in message
...
I have a form, "form a" which is called by a Function in a Sub, "Sub1".
I also have a form, "form b", called by a Sub, "Sub2".

"form b" calls "Sub1" which, in turn, calls "form a." After I unload

"form
a," "form b" comes to the front and "form a" remains visible in back of

"form
b". I want "form a" to diappear after it is unloaded. How do I do this?

ShowModal is true for both forms.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How do I hide the form?

I am including the following Code sniippets. I hope this will shed some light.

Calls the Sub:

intTextLen = Len(Sheets("Data").Range("B3").Value)
Do While intTextLen = 0
z = MsgBox("At least one legend is required." & Chr$(13) &
Chr$(10) & _
"Do you wish to enter legends now?", vbYesNo)
If z = vbYes Then
Call CreateLegends <--------- name of sub
Else
MsgBox "You have chosen not to enter any legends." &
Chr$(13) & Chr$(10) & _
"A web page cannot be generated." & Chr$(13) & Chr$(10)
& _
"This form will close."
ActiveCell.Value = "Cancelled"
intTextLen = 1
boolButton = True
Range("A3").Activate
Unload Me
End If
Loop

From form "a":

Private Sub AddButton_Click()
If Len(LegendTitle.Value) = 0 Then
MsgBox "Please enter a Legend Title for this color."
LegendTitle.SetFocus
Else
Range("E2").Value = Range("E2").Value + 1
ActiveCell.Interior.Pattern = xlSolid
ActiveCell.Value = "Legend" & Range("E2").Value
ActiveCell.Offset(0, 1).Activate
ActiveCell.Value = LegendTitle.Value
ActiveCell.Offset(0, -1).Activate
z = setColor()
strUsed = Range("D2").Value
Range("D2").Value = strUsed & strSelected
boolButton = True
Unload ColorForm <------------- form remains visible
End If
End Sub


"Bob Phillips" wrote:

Do you really unload it, or just re-show the other? If you unload it, it
should go.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Andy Dorph" wrote in message
...
I have a form, "form a" which is called by a Function in a Sub, "Sub1".
I also have a form, "form b", called by a Sub, "Sub2".

"form b" calls "Sub1" which, in turn, calls "form a." After I unload

"form
a," "form b" comes to the front and "form a" remains visible in back of

"form
b". I want "form a" to diappear after it is unloaded. How do I do this?

ShowModal is true for both forms.

Thanks




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
Close form instead of hide skuzapo Excel Programming 2 September 26th 05 11:24 PM
how to close a form in vba (not hide) Pierre[_16_] Excel Programming 3 July 15th 05 06:01 PM
Hide a form button Michael Singmin Excel Programming 1 September 16th 04 06:23 PM
Show Form, Hide all Sheets John Pierce Excel Programming 2 June 10th 04 10:42 AM
Form wont hide Tom Ogilvy Excel Programming 1 June 3rd 04 09:21 PM


All times are GMT +1. The time now is 05:41 PM.

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

About Us

"It's about Microsoft Excel"