Please help. I cannot figure out the causes of problems from below codes.
When I open the worksheet it does not automatically execute below codes, so I need to go to the other sheet15(Prj.DBase) and then go back to the working sheet14(Projects) for the codes to be executed.
Another problem I have noticed was when i change any of the values from the two comboboxes (PjCustBox & PDevBox) the program will execute normally on what i wanted it to be. However when I clicked on the other sheet and go back again, the codes will not run as I have expected. The combobox(PDevBox) will display "device name" which was the header of the tranposed list at Sheet(Prj.DBase) and the combobox(PjCustBox), the sheet14.Range("F1").value will erase the current value. I tried to execute each line individually to debug the problem but still I cannot solve the problem.
I attached the captured of my work.
I cannot attached the whole file because of the size restriction.
Summary of Problems:
1. The Program does not run automatically upon opening.
2. When changing to another sheet and going back to the working sheet the comboboxes is not working properly.
Working CODES
==========================================
'Assign dynamic combobox list (PjCustBox)
PjCustBox.Clear
PjCustBox.Value = .Range("D34").Value
For i = 34 To .Range("D" & Rows.Count).End(xlUp).Row
PjCustBox.AddItem .Range("D" & i).Value
Next i
'Assign dynamic combobox list (PDevBox)
PDevBox.Clear
PDevBox.Value = .Range("E34").Value
For n = 34 To .Range("E" & Rows.Count).End(xlUp).Row
PDevBox.AddItem Sheet15.Range("E" & n).Value
Next n
Sheet14.Range("F1").Value = PjCustBox.Value
End If