Aug 22 2023 08:11 AM
I try open form with button from worksheet not let me open form
Private Sub INPUT_POINTS_FORM_Click()
NFL_SCORES_FORM.Show
End Sub
It give run time 9 error
Aug 22 2023 08:46 AM
When the form is loaded, it executes the UserForm_Initialize event procedure
Private Sub UserForm_Initialize()
Me.cmbweeks.Value = ThisWorkbook.Worksheets("TEAMS_INFOS").Range("F1").Value
End Sub
This causes the error that you see, because the worksheet TEAMS_INFOS does not exist.
Aug 22 2023 11:04 AM
Aug 22 2023 11:05 AM - edited Aug 23 2023 08:01 AM
i have updated the file. I have button I want open the form with still give me run time 9 error.
When I run form from vba editor it works
How I get button to works
Thanks You
Aug 22 2023 12:14 PM
Yes, the button tries to open that form, but the form cannot be loaded because its UserForm_Initialize event procedure refers to a non-existent worksheet. See my previous reply.