Occasionally it will run as expected but as soon as the macro ends, excel becomes unresponsive to mouse-clicks.
![excel formatting formula not working excel formatting formula not working](https://appuals.com/wp-content/uploads/2018/05/1-32.jpg)
I have a fairly lengthy macro that works perfectly most of the time. I've been having a strange problem lately. Posted this on the Ozgrid forums, but haven't gotten any help yet, so I thought I'd try here too! It's like the buttons are being disabled when I close or open the file.
![excel formatting formula not working excel formatting formula not working](https://cdn.extendoffice.com/images/stories/doc-excel/copy-formula-only/doc-copy-formula-only-2.png)
When I reopen the file none of the buttons work. The odd thing is if I create a new button it works fine until I save and close the file. I still see the button name "cmdButtonGetInfo" and "=EMBED("Forms.CommandButton.1","") in the name box and formula bar. I can't seem to locate the command button properties any longer. If I right-click the button in Design Mode and select Properties, I get sheet properties not the button properties. Now when I open the workbook, the buttons don't work! When I click them nothing happens. Then I saved and closed the workbook and went to lunch.
Excel formatting formula not working code#
I added the _Click code to run the macros when the user clicked the buttons.Īll of the buttons were working fine. I got into the button properties and set the background colors. So I removed the form control buttons and created new ActiveX command buttons. I had been using the form control buttons to run macros, but the boss wanted each button to have it's own, different color. I'm having a problem in a workbook with several ActiveX command buttons. Sheets("Sheet1").Unprotect Password:="temp"ĪctiveSheet.EnableSelection = xlUnlockedCells ' If Not Intersect(Target, MRange) Is Nothing Then Sub Worksheet_Change(ByVal Target As Excel.Range) I think I am close, but I am getting an "End If without block If" error on the If Clause. If the user selects that cell again, they will get the usual pop-up message, "The cell or chart that you are trying to change is protected." If a user enters a date in a cell or range of cells anywhere in the column, the changed cells also need to be locked and protected (Once they enter a date, it is not allowed EVER to be changed again. I have named the cells in that column "MS96A". I have a worksheet that is locked and protected now, except for cells in a certain collumn. SpellNumber = SpellNumber & " And Cents " SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1))) SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 1))) + " Hundred " If i = 1 And Val(Left(FIGURE, 2)) > 0 ThenĮlseIf i = 2 And Val(Left(FIGURE, 2)) > 0 ThenĮlseIf i = 3 And Val(Left(FIGURE, 2)) > 0 Then SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1))) SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2))) Ringgit Malaysia : Nineteen Thousand Nine Hundred NinetyNine Onlyįunction SpellNumber(amt As Variant) As Variant Amount from 20,000 and above only show thousand? Please help! I am using below code, but it only untill 19,999.