Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel will not open
I'm not sure what I've done or how to fix it. But, I added the
following to a macro: Application.Visible = False UserForm1.Show Application.Visible = True I was attempting to hide the worksheets behind the form, it seemed to work OK until I clicked on a button that was to copy values from various comboboxes and textboxes to a sheet and perform a print preview. (which worked perfectly until I added the above code.) Once I hit the button, excel shut down on me and now the workbook will not open, as if the 'application.visible = false' is still running. If I open Microsoft Excel, a blank sheet, then open my workbook, it will open. But, when I go to the code, it's not there? Can anyone clue me in on what I did? And is there a way to fix it? Also, I copied this now open file and saved it to another name, but still won't open when it's doubled clicked... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel will not open
Additional note, as I'm researching this problem I see I can no longer
open any excel file by double clicking on it. It will open if I open Excel App first, then access the file(s) via the File Open button. Again, any thoughts on this would be great.... Gimp wrote: I'm not sure what I've done or how to fix it. But, I added the following to a macro: Application.Visible = False UserForm1.Show Application.Visible = True I was attempting to hide the worksheets behind the form, it seemed to work OK until I clicked on a button that was to copy values from various comboboxes and textboxes to a sheet and perform a print preview. (which worked perfectly until I added the above code.) Once I hit the button, excel shut down on me and now the workbook will not open, as if the 'application.visible = false' is still running. If I open Microsoft Excel, a blank sheet, then open my workbook, it will open. But, when I go to the code, it's not there? Can anyone clue me in on what I did? And is there a way to fix it? Also, I copied this now open file and saved it to another name, but still won't open when it's doubled clicked... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel will not open
Thanks, I checked Task Manager before but only the application list.
excel.exe was still running as a process, ended it and it all seems OK now. Thanks But, one thing, when I check for this nasty code, it was no longer in the macro. I assume that is because when excel shut down it did not save my changes? Yes? Again, thanks for you very quick response... And...yes, I'm not as season'd as I wanna be..... Jim Thomlinson wrote: Close XL and take a look in your task manager and see if there is still an instance of XL running (the instance that you set to not be visible where your workbook may still be open). Just because you can not see it does not mean that it is not still there. IMO the type of code you are attempting when you hide the application is very dangerous and should only be attempted by the well seasoned VBA coder with a lot of experience and knowledge. -- HTH... Jim Thomlinson "Gimp" wrote: I'm not sure what I've done or how to fix it. But, I added the following to a macro: Application.Visible = False UserForm1.Show Application.Visible = True I was attempting to hide the worksheets behind the form, it seemed to work OK until I clicked on a button that was to copy values from various comboboxes and textboxes to a sheet and perform a print preview. (which worked perfectly until I added the above code.) Once I hit the button, excel shut down on me and now the workbook will not open, as if the 'application.visible = false' is still running. If I open Microsoft Excel, a blank sheet, then open my workbook, it will open. But, when I go to the code, it's not there? Can anyone clue me in on what I did? And is there a way to fix it? Also, I copied this now open file and saved it to another name, but still won't open when it's doubled clicked... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel will not open
Hi
Rob Bruce published a bit of vbs script that enables you to get that hidden application back. Too late now but if it happens again it will help you. bw Tim ' === Begin script =============== ' from Rob Bruce Dim objXL, strMessage On Error Resume Next Set objXL = GetObject(, "Excel.Application") If Not TypeName(objXL) = "Empty" Then strMessage = "Excel Running." Else strMessage = "Excel Not Running." End If MsgBox strMessage, vbInformation, "Excel Status" if strMessage = "Excel Running." then objXL.Visible = true ' === End script =============== "Gimp" wrote in message ps.com... Thanks, I checked Task Manager before but only the application list. excel.exe was still running as a process, ended it and it all seems OK now. Thanks But, one thing, when I check for this nasty code, it was no longer in the macro. I assume that is because when excel shut down it did not save my changes? Yes? Again, thanks for you very quick response... And...yes, I'm not as season'd as I wanna be..... Jim Thomlinson wrote: Close XL and take a look in your task manager and see if there is still an instance of XL running (the instance that you set to not be visible where your workbook may still be open). Just because you can not see it does not mean that it is not still there. IMO the type of code you are attempting when you hide the application is very dangerous and should only be attempted by the well seasoned VBA coder with a lot of experience and knowledge. -- HTH... Jim Thomlinson "Gimp" wrote: I'm not sure what I've done or how to fix it. But, I added the following to a macro: Application.Visible = False UserForm1.Show Application.Visible = True I was attempting to hide the worksheets behind the form, it seemed to work OK until I clicked on a button that was to copy values from various comboboxes and textboxes to a sheet and perform a print preview. (which worked perfectly until I added the above code.) Once I hit the button, excel shut down on me and now the workbook will not open, as if the 'application.visible = false' is still running. If I open Microsoft Excel, a blank sheet, then open my workbook, it will open. But, when I go to the code, it's not there? Can anyone clue me in on what I did? And is there a way to fix it? Also, I copied this now open file and saved it to another name, but still won't open when it's doubled clicked... |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel will not open
Thanks to all that 'chimmed' in and helpped out. I am new at working
with VBA let aone with a user form. I must say however with the assistance of many on this group I've made good progress (i'm demoing what I have so far today..). Anyway, I was attempting to 'hide' the sheets from the back ground before the app crashed. What I ended up doing is using .xlveryhidden on 3 of the 4 sheets, when the workbook is opened. Only one sheet shows when the book is open. That sheet just has our company logo that is linked to a macro. When clicked it runs my splash screen and sets the 3 sheets visible = true. Now when the user form is shown, I made it bigger to cover most of the screen, two comboboxes have a worksheet.active to 'get the data' and I proceed with the form, which include mostly textboxes and math calcs. When the form is closed, via a button, the 3 sheets are set to .xlveryhidden again. Maybe not as graceful as you experts would put together, but for me it seems to do the trick. Does anyone see a problem or potential issue with this configuration? (by the way, after my demo today I'm sure I'm going to end up with a laundry list of things to add...) Tom Ogilvy wrote: You are correct in your perceptions. When you forced excel to close in the task manager, it doesn't not close gracefully as they say - workbooks were closed without saving changes. -- Regards, Tom Ogilvy "Gimp" wrote: Thanks, I checked Task Manager before but only the application list. excel.exe was still running as a process, ended it and it all seems OK now. Thanks But, one thing, when I check for this nasty code, it was no longer in the macro. I assume that is because when excel shut down it did not save my changes? Yes? Again, thanks for you very quick response... And...yes, I'm not as season'd as I wanna be..... Jim Thomlinson wrote: Close XL and take a look in your task manager and see if there is still an instance of XL running (the instance that you set to not be visible where your workbook may still be open). Just because you can not see it does not mean that it is not still there. IMO the type of code you are attempting when you hide the application is very dangerous and should only be attempted by the well seasoned VBA coder with a lot of experience and knowledge. -- HTH... Jim Thomlinson "Gimp" wrote: I'm not sure what I've done or how to fix it. But, I added the following to a macro: Application.Visible = False UserForm1.Show Application.Visible = True I was attempting to hide the worksheets behind the form, it seemed to work OK until I clicked on a button that was to copy values from various comboboxes and textboxes to a sheet and perform a print preview. (which worked perfectly until I added the above code.) Once I hit the button, excel shut down on me and now the workbook will not open, as if the 'application.visible = false' is still running. If I open Microsoft Excel, a blank sheet, then open my workbook, it will open. But, when I go to the code, it's not there? Can anyone clue me in on what I did? And is there a way to fix it? Also, I copied this now open file and saved it to another name, but still won't open when it's doubled clicked... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ON OPEN VBA Code input incorrectly now excel sheet wont open | New Users to Excel | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
EXCEL wont open from Explorer, must open EXCEL then find file | Excel Discussion (Misc queries) | |||
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming |