Active X commands, specifically buttons) have stopped working - overnite

teachman

Active Member
Joined
Aug 31, 2011
Messages
321
Hello,
I have a serious problem. My worksheet (in a workbook of several worksheets) has about 12 command buttons. Last night they were working fine. Now, none of the work.
What the heck?
Guidance appreciated.
THanks,
George Teachman
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
The first thing any of the buttons do is to call another script. This is what is directly tied to the button.
Private Sub NewDiagFeatKindList_Click()
Call NewDiagFeatKindList2
End Sub

The script for this is:
Code:
Sub NewDiagFeatKindList2()
' Shorten Diagnostic Feature Kind choice list

Application.ScreenUpdating = False

' Unprotect Advanced worksheet so Code and Phrase fields can be cleared.
ActiveSheet.Unprotect

For r = 2 To 80 Step 1
    If Range("CI" & r) = "" And Range("CJ" & r) <> "" Then
      Range("CI" & r & ":CK" & r).Select
      Selection.Delete Shift:=xlUp
      r = 1
    End If
Next r
NewLimit = Application.WorksheetFunction.CountA(Range("CK3:CK81")) + 2
' Do the sort
    Range("CJ3:CK" & NewLimit).Select
    ActiveWorkbook.Worksheets("Advanced").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Advanced").Sort.SortFields.Add Key:=Range( _
        "CJ3:CJ" & NewLimit), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortNormal
    With ActiveWorkbook.Worksheets("Advanced").Sort
        .SetRange Range("CJ3:CK" & NewLimit)
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Range("CI3").Select

' Set Code and Phrase cells yellow with a normal border to indicate to the user
' they are not to edit those cells.  They can't anyway, but this is a visual clue.
    Range("CJ3:CK" & NewLimit).Select
    Range(Selection, Selection.End(xlDown)).Select
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    Range("CI3").Select

' Protect Advanced worksheet after creating the new Choice list.
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Application.ScreenUpdating = True

End Sub

Thanks for any help you can give me.

George Teachman
 
Upvote 0
I had restarted Excel many times with no luck. But, this morning I had to reboot my machine for other reasons. When it came back up and I logged in and started Excel, the problem was no longer there.
I guess I should have tried rebooting but it didn't come to mind.

Thanks,

George Teachman
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,772
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top