CsJHUN
Active Member
- Joined
- Jan 13, 2015
- Messages
- 360
- Office Version
- 365
- 2021
- 2019
- Platform
- Windows
- Mobile
Hi guys i have this:
The picture loading is working if the picture is present in the given directory, but if its not the "On Error GoTo pacikaki" is not going to "pacikaki"
I would like some help from you, what m i missing?
Cheers
Code:
Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)Application.ScreenUpdating = False
On Error GoTo kov 'I need this error handler becasue some users are not macro friendly.... :)
ActiveSheet.ShowAllData
kov:
Cells.Find(What:=ComboBox1.Value, After:=Range("C10"), LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
aclr = ActiveCell.Row - 10
'...
'load a barrowful of data from sheets into form textbox
'...
On Error GoTo 0 'tried with this and w/o this not helped
On Error GoTo pacikaki[U] 'this error handerdont want to work[/U]
Me.Image1.Picture = LoadPicture("some intranet address" & ComboBox1.Value & ".jpg")
CreateObject("WScript.Shell").Popup TextBox2.Value & " adatai beolvasva", 1, "Info"
Exit Sub
pacikaki:
MsgBox ("hiba a képpel, szinte képtelenség!")
CreateObject("WScript.Shell").Popup TextBox2.Value & " adatai beolvasva", 1, "Info"
End Sub
The picture loading is working if the picture is present in the given directory, but if its not the "On Error GoTo pacikaki" is not going to "pacikaki"
I would like some help from you, what m i missing?
Cheers