Good day all,
I have a command button titled "LOW STOCK" on my userform, I want the back color of this button to switch between yellow and salmon when Cell G3 > 0 (Cell G3 contains number of products below stock minimum limit).
The blinking will prompt the user to click the button inorder to display (via a pop up message box) numbers of products having low stock.
I inserted the code below in Userform_Initialize, but excel freezes up and displays on the title bar "Excel is Not Responding". Please I'll be glad to know where I went wrong, thanks in advance.
Sub Userform_Initialize
Do while sheet1.Cells(3, 7) > 0
btnLowStock.Backcolor = RGB(255, 255, 0)
btnLowStock.Backcolor = RGB(255, 128, 128)
Loop
End Sub
I have a command button titled "LOW STOCK" on my userform, I want the back color of this button to switch between yellow and salmon when Cell G3 > 0 (Cell G3 contains number of products below stock minimum limit).
The blinking will prompt the user to click the button inorder to display (via a pop up message box) numbers of products having low stock.
I inserted the code below in Userform_Initialize, but excel freezes up and displays on the title bar "Excel is Not Responding". Please I'll be glad to know where I went wrong, thanks in advance.
Sub Userform_Initialize
Do while sheet1.Cells(3, 7) > 0
btnLowStock.Backcolor = RGB(255, 255, 0)
btnLowStock.Backcolor = RGB(255, 128, 128)
Loop
End Sub
Last edited: