Excel Deployment - resizing and other component display issues - excel

I have been working on a project in excel for a while and am having problems deploying it to my client. We have (exactly) the same version of excel but when he opens the file the sizing of the components is all wrong. Please see the screenshots below:
When he turns on design mode or clicks and holds the vertical scroll bar, the issue corrects itself for the most part:
But when compared to the original there are still issues, such as the "Rental Start" and "Rental End" labels.
I should also mention that this problem is not isolated to this project. We had some issues with a different one, as well, but never made the connection between design mode and couldn't figure it out. I have tried my IntegralHeight property per a forum post somewhere, as well as double checking that my components are not set to size with cells. Does anyone know why this might be occurring? He has windows 8.1 and I have 7, if that could be the difference.
Note: All controls are ActiveX controls.

Related

How to set up the correct 'View' for VBA Project in Microsoft Excel?

Not sure if this is the correct place to post this but this issue is driving me insane....
The Issue:
I have come to use my PC after the weekend and for some reason the layout of the VBA Project stuff is completely messed up...
Usually when my VBA is set up very nicely in what I believe is the standard viewing mode IE the Project box to the left and the code to right and the intermediate window at the bottom...
For some reason now I get the following:
As you can see it is just the code...
I then click on the project explorer window and the project details appear, but as one ridiculously large page....
Then I minimise the window and alter its shape to try and get it at least look like it used to...
I can live with this to an extent although everything is floating and annoying... But now, every time I click onto a module (to view the code). It opens each module as its own seperate window!
This as you can imagine is unsustainable when working with as lot of code and having to flick between different modules
What I have Tried:
I have tried looking in different settings and I can not see anything different...
I have restarted my PC and it is still the same...
I have tired opening a different spreadsheet and still the same....
Does anyone have any suggestions? I just want it to be back to the simple layout of everything joined together etc...

VbaCodeCleaner appears as though Focus Rectangle Thicker is checked when it is unchecked

I’m running Excel 2010 & Excel 2003 on a Windows 10 version 21H2 machine.
I noticed a change in the appearance of Rob Bovey’s VbaCodeCleaner. A thick border appears around whatever has the focus (buttons, tabs, file selection), which makes reading the corresponding text difficult.
On a different machine running same OS and MS Office versions, everything appears normal.
What I’ve tried:
Run a repair on MS Office
Downloaded and installed the latest VbaCodeCleaner
Searched the internet for a possible Windows setting causing this.
As this is happening on both versions of Excel I suspect this might end up being a Win 10 setting.
UPDATE: I just noticed that this is also happening with the Tools>References dialog.
Well, I think I may have resolved the problem. The Focus Rectangle Thicker was already unchecked, so I checked it, Apply, unchecked it and Apply again and voila! So I have no idea what really happened, but toggling that setting seems to have fixed it.

Excel ActiveX Button is clickable, but does not work

About a week ago, I found that all ActiveX buttons stopped working in all spreadsheets, when running on my computer. They work on others just fine. There had been no issues for the past year.
I know there was recently a Windows updates that caused a stir, preventing people from even being able to click on ActiveX buttons. The issue I am experiencing seems to be different... I am able to click on the button (once clicked, it will show the dotted line around the perimeter of the button). however, nothing happens.
I have these buttons created to open User forms. I have checked to verify the PrivateSub code still exists to launch the form on the Button Click.
Since all my staff are still able to use the spreadsheets and ActiveX buttons, I am thinking there is something occurring locally on my computer, and it is not necessarily programming related, but I have had no luck finding any cause.
Any ideas?
I found a solution to the issue. It appears as though my issue WAS still related to the Microsoft update.. I just happened to be experiencing a different symptom, and needed a different solution as well (rather than just delete MSForms.exd files)
I recompiled the projects (Open VBEditor, Debug Menu, Compile VBA Project), saved workbook, closed excel, and re-opened. Everything worked as normal again.
Unfortunately, I need to do this for all files I work with which have ActiveX controls, which is several dozen.

Excel 2007 Issue: Pre-programmed Buttons suddenly not working [duplicate]

This question already has answers here:
Microsoft Excel ActiveX Controls Disabled?
(11 answers)
Closed 8 years ago.
Today, out of the blue, a form that the company I work for uses, suddenly had an issue with it's buttons. Strangely enough it only is affecting what I'm pretty sure are the ActiveX Command Buttons and not causing a problem with the other shapes or drop downs.
The issue. The buttons are non-responsive. When you click, they don't access the code and checking them via the shapes menu and selecting "view code" causes them to open the developer menu, but not the code associated with them. The really big issue is that for some reason they ALL seem to have started failing at the same time. The version on the server no longer works (the primary copy), the copy the user uses (notorious for breaking things) and the version I use (which is on my local computer).
Is there a way to take them an re-associate them with the proper code, without deleting them completely re-making them or is there possibly someone who's had the same issue and figured out a fix?
I'd greatly appreciate any suggestions or help - please note: I'm 99.9% sure that the issue is not code based.
The problem is caused by a recent Office update. Here is the fix posted on http://excelmatters.com/2014/12/10/office-update-breaks-activex-controls/
To fix it, do this:
Close all Office applications.
Do a search in Windows Explorer – make
sure to include hidden and system files and folders – for *.exd files
(note: that’s not *.exe !!) and delete any you find.
Make sure you get these:
C:\users\username\AppData\Local\Temp\Excel8.0\MSForms.exd
C:\users\username\AppData\Local\Temp\VBE\MSForms.exd
Reboot the computer (this is not always necessary, but probably better safe than
sorry)
Restart your Office apps and test the controls again.

Enable button using VBA excel

I have an uncommon issue. I have an Excel file with macros. On all computers it was installed Office 2010 and everything worked fine, but a few days ago every computer was upgraded to Office 2013.
In code, at some point I enable or disable some buttons based on some criterias.
ThisWorkbook.Worksheets("Lab Orders").OLEObjects("CommandButton1").Enabled = False
On some computers this works fine , but on other computers this button is shown as enabled, and if the user clicks the button nothing happens, not even the animation where the the button is pressed, so it cannot execute the code behind. It's like an image. Any leads, or reasons why this is happening only on certain computers ?
I have this problem after the Office got upgraded. PS. All computers are in the same domain.
LATER EDIT
I changed the code line
ThisWorkbook.Worksheets("Lab Orders").CommandButton1.Enabled = True
and now I get this error: 438 at this row (I debbuged the file on a computer where this file does not work)
I suspect it's the issue with the latest Office updates - see if this fixes it: http://excelmatters.com/2014/12/10/office-update-breaks-activex-controls/
On all computers where you have the problem, check the box "Trust access to the VBA project object model" located in Options/Trust Center/Macro Settings
(Note that this will only apply to Excel, and if you are having the same problems on other MS Office softwares, you should do the same on them as well)
If that's still not working, read and apply all the checks on this page : https://support.office.com/en-gb/article/Enable-or-disable-macros-in-Office-files-12b036fd-d140-4e74-b45e-16fed1a7e5c6
Did not fit as a comment, so:
If I understand you correctly, some computers show the button enabled, while in fact it is disabled, right?
In this case it's normal no button press animation "visibly happens" as Windows knows the button was programmatically disabled.
The same thing happens if you hook a window (which has buttons on it) and send any button a WM to show itself as if it was enabled (while in fact it is not).
The reason it seems enabled on some computers may vary, most probably it's video card and/or driver 'issue', or some "strange alignment" (that particular OS with that particular graphics card & driver and DirectX, as well as those 'special' OLE settings, etc).In both cases, the screen area don't get "refreshed" (invalidated) after the button was disabled - so it seems enabled and gets "repainted" only when there was some user interaction around it. "Lazy redraw", so to speak :)
What one can do is, if it happens to be a serious issue, to find a way on one of these computers to get the button visibly disabled with some 'workaround' (e.g. changing button text after it was disabled -maybe even to exactly the same text-, or move it 1 pixel away and back, call InvalidateRect on it, etc), and apply that solution to your Excel macro.
UPDATE after reading asker's comment:
Oh I see. This could happen if the buttons are in a control array. The issue in this case, however should be present on all computers... Strange.
Anyway. Try to test the buttons' Index property to see if they are part of a control array, just to be sure. If yes:
a) remove them from the array and create buttons "independent" from each other
b) create a bool array and store there enabled/disabled status and write a function that updates buttons' text color property & handles button click event ignore/accept

Resources