PDA

View Full Version : Macro only working with a breakpoint inserted



xSmityx
11-17-2016, 09:58 AM
To start off, I'm using Windows 10, Office 2016. I do believe my problem relates to an office update that may have been installed, but I don't see any update related to office 2016 in my 'view installed updates' tab in control panel.

The code is pretty basic:

Dim lbl As control
For Each lbl In Me.Controls

If TypeName(lbl) = "Label" Then
lbl.BackColor = RGB(253, 208, 23)
End If


Next

So any labels that I hadn't set to transparent are now showing up with a background color of gray.

Another section of code that controls tabbing in and out of a frame couldn't be any more simple.

Private Sub txtRe_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Keycode = 9 Then
cmdNext.SetFocus
End If
End Sub



So now it no longer tabs out of the frame and to the cmdNext control that is below the frame.

Now my belief for it being an office update is because on one of my computers I have disabled automatic updating, whereas of course on the other one, they are set to automatically update. I'm wondering if there's a workaround for this issue, something I'm missing, or a way to determine which update I need to remove and how to do that?

Thanks for any help.

gmaxey
11-17-2016, 08:52 PM
It may be caused or related to this:
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_winother/known-issue-with-vba-forms-in-september-feature/ceb5161a-2b36-470c-a30d-b088bc131411?tm=1477513988651 (https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_winother/known-issue-with-vba-forms-in-september-feature/ceb5161a-2b36-470c-a30d-b088bc131411?tm=1477513988651)

xSmityx
11-18-2016, 01:52 PM
Well after looking into it further I came across the same kind of article. My auto update feature was set once every few weeks so I manually updated office and it took care of itself.