Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Show/Unload Userform

For some reason, I keep getting a message "Runtime error 361. Can't unload
this object."

The part that has me stumped is that
"frmWEFNetPlotting.Show" works fine.

"Unload frmWEFNetPlotting" debugs with that message.

Any suggestions? Obviously they're referencing the same object, but I don't
see why it will show the object, but then not unload it.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Show/Unload Userform

Strange

If you use "Unload Me" in the code in the userform module do you have the same problem then

Where do you use the code line
Unload frmWEFNetPlotting

--
Regards Ron de Bruin
http://www.rondebruin.nl



"StephanieH" wrote in message ...
For some reason, I keep getting a message "Runtime error 361. Can't unload
this object."

The part that has me stumped is that
"frmWEFNetPlotting.Show" works fine.

"Unload frmWEFNetPlotting" debugs with that message.

Any suggestions? Obviously they're referencing the same object, but I don't
see why it will show the object, but then not unload it.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Show/Unload Userform

I use
Sub NetWEFPlotting()
frmWEFNetPlotting.Show
End Sub

to bring up the form. Then within my form:

Private Sub Cancel_Click()
Unload frmWEFNetPlotting
End Sub
Private Sub OK_Click()
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
Workbooks.Open
Filename:="\\Fl-msjf-fs1\Data\Data\RECOVERY\EXLDATA\Loan Recovery MIS\Net
Placement Plotting\WEF\WEF " & ListBox1.List(i) & " Net Plotting by
Placement.xls"
End If
Next i
Unload frmWEFNetPlotting
End Sub
Private Sub Userform_Initialize()
With ListBox1
.AddItem "Primary", 0
.AddItem "Secondary", 1
.AddItem "Tertiary", 2
.AddItem "Deceased", 3
.AddItem "Internal", 4
.AddItem "IGATLB", 5
End With
End Sub



I just switched it to "Unload Me" and that works fine. I'll leave it that
way, but that was really strange.

"Ron de Bruin" wrote:

Strange

If you use "Unload Me" in the code in the userform module do you have the same problem then

Where do you use the code line
Unload frmWEFNetPlotting

--
Regards Ron de Bruin
http://www.rondebruin.nl



"StephanieH" wrote in message ...
For some reason, I keep getting a message "Runtime error 361. Can't unload
this object."

The part that has me stumped is that
"frmWEFNetPlotting.Show" works fine.

"Unload frmWEFNetPlotting" debugs with that message.

Any suggestions? Obviously they're referencing the same object, but I don't
see why it will show the object, but then not unload it.




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
unload userform problem leonidas[_35_] Excel Programming 3 July 5th 06 05:35 PM
Unload Userform doesn't work here - why? rammieib Excel Programming 1 February 23rd 06 01:51 PM
Userform Question (Load/Unload/Show/Hide) RPIJG[_76_] Excel Programming 8 November 2nd 05 08:29 PM
load/unload userform Fred[_22_] Excel Programming 3 August 22nd 05 04:00 AM
unload userform from within one of that form's beforeupdate events? Andrew H[_3_] Excel Programming 1 August 10th 04 09:07 AM


All times are GMT +1. The time now is 07:25 AM.

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"