VBA/Macro Button - Need To Start Out Disabled

Brian 1 Reputation point
2022-08-11T12:23:55.197+00:00

I have an old, legacy, but still 100% production spreadsheet that I modified to add an UPDATE button...this is to allow them to "update" the sheet it creates after it is created...it has other buttons as well and one of them is disabled until a condition is met. I need this UPDATE button to be disabled until the SUBMIT CUSTOMER Macro is ran, which I do believe I have in the code...it just isn't initially disabled.

230429-vba-01.jpg

Do I need to snip other code? Any suggestions so far?

Private Sub Workbook_Open()
If ActiveWorkbook.Name = "Change_Request_DEV.xlsm" Then
Call cmdbutton_Proporties("SelectContract", False, False)
Call cmdbutton_Proporties("SelectCustomer", True, True)
Call cmdbutton_Proporties("SubmitRequest", True, False)
Call cmdbutton_Proporties("UpdateRequest", True, False)
If ActiveWorkbook.ReadOnly Then
New_CO_Request
End If
Else
Call cmdbutton_Proporties("SelectContract", False, False)
Call cmdbutton_Proporties("SelectCustomer", False, True)
If Sheets("Req").Range("I5").Value = "" Then
Call cmdbutton_Proporties("SubmitRequest", True, True)
Else
Call cmdbutton_Proporties("SubmitRequest", True, False)
End If
If Sheets("Req").Range("I5").Value = "" Then
Call cmdbutton_Proporties("UpdateRequest", True, True)
Else
Call cmdbutton_Proporties("UpdateRequest", True, False)
End If

End If
End Sub

Developer technologies | Visual Basic for Applications
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.