• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Disabled Close Button

willheap

Member
I have unusual problems with a workbook, named DCT, that I am working on from two separate computers running two different versions of MS Excel. I have tried to find a solution on line but I'm obviously not searching for the correct thing.

My work computer is running 2007 while my home computer runs 2010. I only get these issues with MS Excel 2007. This has never been a problem when the DCT is opened in 2010. My colleagues, also running 2007, have the same issues with the DCT.

The problems in 2007 are;

1. When opening the DCT, if there are any other workbooks already open but their windows are not maximised then it is not possible to maximise the DCT window.

2. The close button at the top right of excel is disabled for the DCT but not on other open workbooks. The only way to close the DCT is to select close from the Office button menu. This would suggest that cancel = true in Workbook_BeforeClose but it isn't and even if I set it to false this makes no difference.

3. The DCT does contain VBA code but I have not intended for anything related to the above issues. I have no Workbook_BeforeClose events and I have not attempted to disable the close button in any version.

(I haven't uploaded a copy of the file yet as I will have to remove the sensitive data first - which is a lot!)

Many thanks in advance of your efforts to help ;)
Will
 
Hi, willheap!
Consider uploading a sample file (including manual examples of desired output if applicable), it'd be very useful for those who read this and might be able to help you. Thank you.
Regards!
 
Hi, willheap!
Funny this Wednesday? Give a look at the uploaded files. Not able to be directly opened, tried to download and it's a PowerPoint file with the extension of an Excel macro file... and finally it's password protected.
If something's missing it's a virus that tried to issue a Format C: /Q. :(
Regards!
 

Attachments

  • Disabled Close Button - 1 (for willheap at chandoo.org).png
    Disabled Close Button - 1 (for willheap at chandoo.org).png
    21.6 KB · Views: 9
  • Disabled Close Button - 2 (for willheap at chandoo.org).png
    Disabled Close Button - 2 (for willheap at chandoo.org).png
    35.7 KB · Views: 8
Very strange, the link works fine when I click it!
I shall redo the link.
Thanks for your efforts so far SirJB7
 
Sorry guys, I have only just noticed that I can upload a file here now.... Shows how long ago I last visited this forum.
 

Attachments

  • DCT%20for%20Chandoo[1].xlsm
    231.5 KB · Views: 11
Hi, willheap!
Both file uploads at Google Docs and at this forums worked, files downloadable. Gonna take the last as valid.
Regards!
 
Hi, willheap!

Interesting workbook. Strange behavior. Look at what I found:

a) It stops at this line, with error 5 (invalid argument o procedure call). And it's not a no. of CF as I used more than 6 lots of times. I swapped it with a previous one and still insist on stopping there. The formula is correct, I even changed it to =LCASE(RIGHT($C4,5))=""total"", and still stopped there. I added the condition manually from Excel, commented that line but left all the others referencing the 6th condition, and it continued running Ok, but the format to the 6th condition were not applied. I don't understand.

b) When I try to close the workbook to load a fresh copy of the file, close button sometimes laughs at me, so as I have other workbooks opened, had to issue a activeworkbook.close from immediate window. And I'm using Excel 2010!!!

Will play a bit more with it and tell you what I found. If I found anything.

Regards!
 
Thanks guys,
........ do you mean interesting bad or interesting good?

The original wb is considerably bigger than this and probably requires some guidance on navigating the worksheets but hopefully you can work out what is going on from the jumbled VBA.

The VBA isn't finished.... as you can tell.... lots of annotating to do.

I'm just stumped as to why the window controls disappear - and you can watch them disappear when you open the DCT with another workbook already opened with it's window not maximised. The DCT opens, then after the workbook_open events run the window controls vanish. The DCT workbook window controls don't exist for me in 2010 but the main Close Excel button on the top right still works - but neither work in 2007.

Even after stopping any of the vba from running, the window controls still vanish... :-/ What on earth is going on?

Could it have anything to do with the Custom UI? This is the first time that I have used it so don't have much experience with what it could affect.

Thanks again...
 
Hi, willheap!
Interesting as of curious and unseen, but as bad as the worst one since it random behavior. The weirdest thing is that under 2010 sometimes it works, sometimes it doesn't. The red close button. The formula for the 6th CF condition it's another thing.
Regards!
 
I have now transferred all modules, userforms, worksheets and named ranges to a new workbook. I haven't got a custom UI manager in the office so I haven't transferred that yet - but it works so far with none of the problems listed above! When I get chance I will transfer the custom UI and see if that breaks the workbook.
I don't have any issues with any CF (but I didn't in the original DCT either - so, not sure what's happened there.)
I think I will abandon the original DCT workbook as something has clearly gone wrong in a special way, and continue with this fresh workbook.
Thanks to all, especially SirJB7, for your input and your valuable time. It has been much appreciated.
Will
 
Hi, willheap!
Glad you help you, even if you couldn't solve it. Thanks for your feedback and for your kind words too. And welcome back whenever needed or wanted.
Regards!
PS: If you happen to discover or better indeed solve the problem, please tell us.
 
As the copied data now works fine, I doubt I will ever discover the source of the problem with the original DCT workbook. Just one of those things...
Thanks again guys
 
Hi, willheap!
Who knows then, for the time being the issue is solved. If it happens again, ooops! :oops:
Regards!
 
Back
Top