Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default excel freezing

i have a problem, My program keeps freezing, the screen is half
userform and half spreadsheet at the point of freezing,

the code is as follow

Private Sub CommandButton7_Click()
Call mis

If Worksheets("display").Range("b3").Value = "" Then
MsgBox Title:="Reports program", PROMPT:="There Are No Records
Returned, Please Return To The Menu"
Exit Sub
End If
Worksheets("display").Range("a1") = "MIS Report"
Unload Me
End Sub

the program calls mis the code for this is

Sub mis()
Dim region
Dim webdata As Range
Set webdata = Worksheets("mis").Range("a1:w3000")

Application.ScreenUpdating = False
region = Worksheets("codes").Range("b12")
If region = ("No Filter Set") Then
webdata.Copy Destination:=Sheets("display").Range("a2")
Else
webdata.AutoFilter Field:=2, Criteria1:=region
webdata.Copy Destination:=Sheets("display").Range("a2")
webdata.AutoFilter Field:=2
End If


Worksheets("display").Select

Call bestfit

Application.ScreenUpdating = True
End Sub

It seems that the form is not unloading, the weird thing is that it
was working fine, and just started to freeze

hope someone can help

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default excel freezing

Try this:

Private Sub CommandButton7_Click()
Call mis

If Worksheets("display").Range("b3").Value = "" Then
MsgBox Title:="Reports program", PROMPT:="There Are No Records
Returned, Please Return To The Menu"
Exit Sub
End If
Worksheets("display").Range("a1") = "MIS Report"
Application.ScreenUpdating = True
Unload Me
DoEvents
End Sub

--
Regards,
Tom Ogilvy


wrote in message
ups.com...
i have a problem, My program keeps freezing, the screen is half
userform and half spreadsheet at the point of freezing,

the code is as follow

Private Sub CommandButton7_Click()
Call mis

If Worksheets("display").Range("b3").Value = "" Then
MsgBox Title:="Reports program", PROMPT:="There Are No Records
Returned, Please Return To The Menu"
Exit Sub
End If
Worksheets("display").Range("a1") = "MIS Report"
Unload Me
End Sub

the program calls mis the code for this is

Sub mis()
Dim region
Dim webdata As Range
Set webdata = Worksheets("mis").Range("a1:w3000")

Application.ScreenUpdating = False
region = Worksheets("codes").Range("b12")
If region = ("No Filter Set") Then
webdata.Copy Destination:=Sheets("display").Range("a2")
Else
webdata.AutoFilter Field:=2, Criteria1:=region
webdata.Copy Destination:=Sheets("display").Range("a2")
webdata.AutoFilter Field:=2
End If


Worksheets("display").Select

Call bestfit

Application.ScreenUpdating = True
End Sub

It seems that the form is not unloading, the weird thing is that it
was working fine, and just started to freeze

hope someone can help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default excel freezing

Thanks, unfortunatley this did not help it just now seems to freezewith
just the form showing

regards

John

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
Excel 2007 Freezing Scott Excel Discussion (Misc queries) 1 October 29th 07 05:29 PM
Excel freezing up constantly Marybeth Excel Discussion (Misc queries) 2 April 24th 07 04:34 PM
Help! Excel keeps freezing Ruth-Ann Excel Discussion (Misc queries) 0 January 6th 06 03:36 PM
Excel Freezing rekseah Excel Discussion (Misc queries) 1 July 19th 05 04:41 PM
excel freezing [email protected] Excel Programming 1 February 7th 05 09:27 AM


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