Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Excel CLOSE" ERROR
Hello everyone, I am experiencing a very strange Excel behaviour. I have an Excel workbook, which has several elements with events. Lik ComboBox_Change(). So, when I close just a workbook, none of the events handlin procedures are called and I do not have any problems. When I want to close Excel, then for some reason it starts processin those events, and because of the FOCUS problem for SHEETS.RANGE metho I get error: SHEETS method of _Global failed. Is there any way for Excel not to start events' handling procedures a closing? Please help, I don't see where the problem!!! -- Intellihom ----------------------------------------------------------------------- Intellihome's Profile: http://www.msusenet.com/member.php?userid=147 View this thread: http://www.msusenet.com/t-187053255 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Excel CLOSE" ERROR
Have you tried setting Application.EnableEvents to False? Perhaps in the
Workbook_BeforeClose Event? "Intellihome" wrote: Hello everyone, I am experiencing a very strange Excel behaviour. I have an Excel workbook, which has several elements with events. Like ComboBox_Change(). So, when I close just a workbook, none of the events handling procedures are called and I do not have any problems. When I want to close Excel, then for some reason it starts processing those events, and because of the FOCUS problem for SHEETS.RANGE method I get error: SHEETS method of _Global failed. Is there any way for Excel not to start events' handling procedures at closing? Please help, I don't see where the problem!!!! -- Intellihome ------------------------------------------------------------------------ Intellihome's Profile: http://www.msusenet.com/member.php?userid=1479 View this thread: http://www.msusenet.com/t-1870532557 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Excel CLOSE" ERROR
It would help if you post the code.
-- HTH Bob Phillips "Intellihome" wrote in message ... Hello everyone, I am experiencing a very strange Excel behaviour. I have an Excel workbook, which has several elements with events. Like ComboBox_Change(). So, when I close just a workbook, none of the events handling procedures are called and I do not have any problems. When I want to close Excel, then for some reason it starts processing those events, and because of the FOCUS problem for SHEETS.RANGE method I get error: SHEETS method of _Global failed. Is there any way for Excel not to start events' handling procedures at closing? Please help, I don't see where the problem!!!! -- Intellihome ------------------------------------------------------------------------ Intellihome's Profile: http://www.msusenet.com/member.php?userid=1479 View this thread: http://www.msusenet.com/t-1870532557 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Excel CLOSE" ERROR
Not a problem here is my code: Private Sub Workbook_BeforeClose(Cancel As Boolean) Sheets("About").Select Application.EnableEvents = False End Sub and the other one: Private Sub ComboBox1_Change() If Sheets("Display").Range("B39").Value = vbNullString Then <<<<<< this is where it gives me an error, but only when I try to close whol Excel, not just a workbook. Application.ScreenUpdating = False Application.EnableEvents = False Application.ActiveSheet.Range("A1").Select ... -- Intellihom ----------------------------------------------------------------------- Intellihome's Profile: http://www.msusenet.com/member.php?userid=147 View this thread: http://www.msusenet.com/t-187053255 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Excel CLOSE" ERROR
In excel 2000 these work for me
If Sheets("Display").Range("B39").Value = vbNullString Then If Sheets("Display").Range("B39") = vbNullString Then If len(Sheets("Display").Range("B39")) = 0 Then -- steveB Remove "AYN" from email to respond "Intellihome" wrote in message ... Not a problem here is my code: Private Sub Workbook_BeforeClose(Cancel As Boolean) Sheets("About").Select Application.EnableEvents = False End Sub and the other one: Private Sub ComboBox1_Change() If Sheets("Display").Range("B39").Value = vbNullString Then <<<<<<< this is where it gives me an error, but only when I try to close whole Excel, not just a workbook. Application.ScreenUpdating = False Application.EnableEvents = False Application.ActiveSheet.Range("A1").Select ... -- Intellihome ------------------------------------------------------------------------ Intellihome's Profile: http://www.msusenet.com/member.php?userid=1479 View this thread: http://www.msusenet.com/t-1870532557 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Excel crashes on "Close" Visual Basic error 400 | Excel Discussion (Misc queries) | |||
Close workbook with "Cancel=TRUE" in the BeforeClose()" | Excel Programming | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming | |||
How can I get "File Close" to prompt me to "Save Changes" ?? | Excel Programming |