Forum Discussion
oslowow
Jun 23, 2021Copper Contributor
Compile error: Method or data member not found
hi i have problem with my VBA code. Here my codes Dim ErwinG As String Private Sub CMP_UPLOAD_Click() On Error GoTo Salah Dim Erwin As Integer If Me.TXTNAMA.Value = "" Then Call MsgBox("Isi...
oslowow
Jun 23, 2021Copper Contributor
i thought is not.. where should i put that "LabelPicture"?
HansVogelaar
Jun 23, 2021MVP
You can place it anywhere on the userform.
Alternatively, if you don't need the label, remove the line
Me.LabelPicture.Caption = ThisWorkbook.Path & "\" & Me.TXTNAMA.Value & ".jpg"
from the code. You won't get the error.
- oslowowJun 23, 2021Copper Contributor
HansVogelaar do you mean like this?
- HansVogelaarJun 23, 2021MVP
No, either place a label control on the userform (not in the code) and name it LabelPicture, or remove the line that mentions LabelPicture from the code.
- oslowowJun 23, 2021Copper Contributorok then. i'll try. thank you so much