bruinenat
10-12-2009, 05:44 AM
Hi there
I have a problem that is driving me crazy. I have this worbook with one click button. I you click on it, a userform with multiple controls appears.
Sometimes however - this seems to happen randomly - my Excel application crashes. I have looked all over the internet and thought that the problem was solved; now it's back again...
I call the userform with this macro:
Sub Toon()
'2 Crash oplossing 1: application.vbe.mainwindow tonen en hiden
'1) Activate de userform via: ThisWorkbook.VBProject.VBComponents("Userform1").Activate
Retry:
On Error GoTo AltOploss
'----> '1) Begin oplossing 1
ThisWorkbook.VBProject.VBComponents("Editiescherm").Activate
'----> '1) Einde oplossing 1
On Error Resume Next
Editiescherm.Show
Exit Sub
AltOploss:
'----> '2) Begin oplossing 2
On Error GoTo Retry
Application.ScreenUpdating = False
With Application.VBE.MainWindow
.Visible = True
.Visible = False
End With
Application.ScreenUpdating = True
Editiescherm.Show
On Error Resume Next
'----> '2) Einde oplossing 2
'zie ook
'http://www.ozgrid.com/forum/showthread.php?t=38693
End Sub
I'll try to upload the complete file here (my first post, I hope it works out right). Once again, it occurs not every time, so it's really driving me crazy...
I had to upload it to here as it's zipped file size is > 1 MB:
http://www.mediafire.com/?sharekey=36e4a1f0a101cc54e62ea590dc5e5dbbe04e75f6e8ebb871
thank for your thoughts!
Bruno
I have a problem that is driving me crazy. I have this worbook with one click button. I you click on it, a userform with multiple controls appears.
Sometimes however - this seems to happen randomly - my Excel application crashes. I have looked all over the internet and thought that the problem was solved; now it's back again...
I call the userform with this macro:
Sub Toon()
'2 Crash oplossing 1: application.vbe.mainwindow tonen en hiden
'1) Activate de userform via: ThisWorkbook.VBProject.VBComponents("Userform1").Activate
Retry:
On Error GoTo AltOploss
'----> '1) Begin oplossing 1
ThisWorkbook.VBProject.VBComponents("Editiescherm").Activate
'----> '1) Einde oplossing 1
On Error Resume Next
Editiescherm.Show
Exit Sub
AltOploss:
'----> '2) Begin oplossing 2
On Error GoTo Retry
Application.ScreenUpdating = False
With Application.VBE.MainWindow
.Visible = True
.Visible = False
End With
Application.ScreenUpdating = True
Editiescherm.Show
On Error Resume Next
'----> '2) Einde oplossing 2
'zie ook
'http://www.ozgrid.com/forum/showthread.php?t=38693
End Sub
I'll try to upload the complete file here (my first post, I hope it works out right). Once again, it occurs not every time, so it's really driving me crazy...
I had to upload it to here as it's zipped file size is > 1 MB:
http://www.mediafire.com/?sharekey=36e4a1f0a101cc54e62ea590dc5e5dbbe04e75f6e8ebb871
thank for your thoughts!
Bruno