Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
error message with userforms
Hi, i have aprogram that uses multiple userforms that act as an
interface for the users. It works fine most of the time, every now and then i get the following error message DEBUG "THE OBJECT HAS DISCONNECTED FROM THE SERVER" Is there anything i can do about this. regards John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
error message with userforms
Will need some more information to have any chance of solving that.
RBS wrote in message ups.com... Hi, i have aprogram that uses multiple userforms that act as an interface for the users. It works fine most of the time, every now and then i get the following error message DEBUG "THE OBJECT HAS DISCONNECTED FROM THE SERVER" Is there anything i can do about this. regards John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
error message with userforms
what info do you need
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
error message with userforms
Some sort of summary of what you are doing.
Any code that you think could be relevant to the problem. Does the error happen at a particular line of code? If so knowing that would be helpful. RBS wrote in message oups.com... what info do you need |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
error message with userforms
Hi,
It does not seem to happen at a specific point. The program only uses userforms. Only one userform seems to have a problem below is some code that is assigned to one of the command buttons on the userform. The form displays a list box with data init. The user selects a row from that data, there are several command buttons that take that data off the list and pastes to another part of the spreadsheet. each command button assigns some different data to the row. When the program takes the dat off the list the userform unloads and reloads when its pasted it somewhere else, so that the row the user selects disapears in front of them. It seems as those the program is running out of memory every now and then and just crashes. Hope this helps if not i could always e-mail the programm to you to have alook. code for command button 1 Dim FIVEFOUR Dim answer Application.ScreenUpdating = False Sheets("menu").Select Call comfirststage If ActiveCell.Value = "" Then Sheets("MENU").Select If ActiveCell.Value = "" Then Application.ScreenUpdating = True If ActiveCell.Value = "" Then Exit Sub FIVEFOUR = InputBox(PROMPT:="How Many?") If FIVEFOUR = "" Then MsgBox Title:="POLETRACKER", PROMPT:="You have not entered a number. If you still wish to complete this job then select a unit again and ensure you type in the quantity" If FIVEFOUR = "" Then Call clearback If FIVEFOUR = "" Then Application.ScreenUpdating = True If FIVEFOUR = "" Then Exit Sub Sheets("COM").Select Range("a2").Select ActiveCell.Offset(0, 9).Activate ActiveCell.Value = FIVEFOUR ActiveCell.Offset(0, -9).Activate answer = MsgBox(PROMPT:="another unit?", Buttons:=vbYesNo + vbQuestion) If answer = vbYes Then Sheets("menu").Select If answer = vbYes Then Application.ScreenUpdating = True If answer = vbYes Then Exit Sub If answer = vbNo Then Call proactivecom code for COMFIRSTSTAGE Sub comfirststage() Sheets("COM").Select Range("A1").Select If ActiveCell.Value = "" Then MsgBox Title:="POLETRACKER", PROMPT:="You have not selected a job. Please retry" If ActiveCell.Value = "" Then Exit Sub Sheets("COM").Select clear = Range("a1") Sheets("DISPLAY").Select Range("A1").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:=clear Rows("2:700").Select Selection.Copy Sheets("COM").Select Range("a3").Select ActiveSheet.Paste Range("A3:h3").Select Selection.Copy Range("a2").Select ActiveSheet.Paste CODE FOR PROACTIVECOM Sub proactivecom() Dim checker As Integer Dim UNIT As Integer checker = 0 UNIT = 0 Application.ScreenUpdating = False Sheets("COM").Select Range("A2").Select Do While checker < 20 If ActiveCell.Value < "" Then UNIT = UNIT + 1 ActiveCell.Offset(0, 1).Activate checker = checker + 1 Loop If UNIT < 1 Then MsgBox Title:="POLETRACKER", PROMPT:="You cannot complete this job as you have not assigned any units!" If UNIT < 1 Then ActiveCell.Offset(0, -20).Activate If UNIT < 1 Then Selection.End(xlToLeft).Select If UNIT < 1 Then Exit Sub Range("a2").Select UserForm6.Show End Sub CODE FOR CLEARBACK Sub clearback() Sheets("COM").Select Rows("1:1").Select Application.CutCopyMode = False Selection.ClearContents Rows("2:2").Select Application.CutCopyMode = False Selection.ClearContents Range("A1").Select Sheets("DISPLAY").Select Range("A1").Select Selection.AutoFilter Selection.AutoFilter Field:=1 Range("A1").Select Sheets("MENU").Select Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
system error when inserting UserForms | Excel Programming | |||
excel.exe error when adding controls to userforms | Excel Programming |