Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Opening a UserForm causes a crash in the Exit procedure (Which is never called)

Good evening all,

I am having a problem where when I have the code listed below unREMed
(Not good english, but I am sure you know what I mean) the program falls
over on opening causing Microsoft Excel XP to crash in a major way, when
I have it REMed out the program works fine. I have been through all my
code, approximately twenty A3 pages and checked every section this is
the only one causing the issue. Before I went over the whole document
it would only crash every second and subsequent time you loaded it, but
now it crashes everytime, great programming skills hey ? I tried
putting a msgbox in the exit code to see if it was being called when it
caused the crash but it is does not appear before the crash happens.

I have done a fair bit of programming in VBA and never come across this
before. I created a new document from scratch and pasted all code in to
make sure the base document is not corrupt and it still doesn't work.

Any help you may be able to provide would be greatly appreciated, I have
just rolled this software out to 1500 users, it was working when I and
others in the office tested it but of course it is not now.

Yours sincerely,

Brent McIntyre

This procedure is only called by clicking the Exit button or when you
cancel via the cross in the top right hand corner of the userform.

Public Sub UserForm_Exit_Allowed()
MsgBox("What is going on ?")
UserForm_Main.hide
Unload UserForm_Main
' Workbooks(WorkBook_Name).Worksheets(1).Activate
' Workbooks(WorkBook_Name).Save
' Workbooks(WorkBook_Name).Close
Application.StatusBar = False
Application.ScreenUpdating = True
End Sub

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for 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
Exit a Procedure from a Sub within a sub [email protected] Excel Discussion (Misc queries) 5 June 25th 08 06:59 PM
run procedure when exit design mode Wim SKW Excel Discussion (Misc queries) 1 July 11th 07 09:24 AM
How can Oracle DB Stored procedure be called in MS Excel? Amol Excel Discussion (Misc queries) 1 January 7th 07 10:05 AM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM
crash when exit excel 97 Christy[_2_] Excel Programming 0 September 30th 03 01:58 AM


All times are GMT +1. The time now is 11:58 PM.

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"