I have a UserForm that adds an Image Control to the sheet5, but when the line of code that generates the Image Control runs it adds to the sheet and focus retains in the sheet and the current UserForm4 is forcibly closed.
private sub upload_click
Sheet5.OLEObjects.Add Filename:=Dir(fd.SelectedItems(1)), Link:=True, _
DisplayAsIcon:=True, IconFileName:=Dir(fd.SelectedItems(1)), _
IconIndex:=0, IconLabel:=Dir(fd.SelectedItems(1)), Left:=Sheet5.Cells(cloC.Row, 7).Left, Top:=Sheet5.Cells(cloC.Row, 7).Top, Width:=Sheet5.Cells(cloC.Row, 7).Width, Height:=Sheet5.Cells(cloC.Row, 7).Height
me.show vbmodeless or userform4.show vbmodeless
textbox3.setfocs //EXECUTES THIS LINE BUT GOES TO SHEET5 AND CLOSES THIS USERFORM FORCIBILY \\not working
end sub//STOPS HERE
....... i HAVE CODE
private sub upload_click
Sheet5.OLEObjects.Add Filename:=Dir(fd.SelectedItems(1)), Link:=True, _
DisplayAsIcon:=True, IconFileName:=Dir(fd.SelectedItems(1)), _
IconIndex:=0, IconLabel:=Dir(fd.SelectedItems(1)), Left:=Sheet5.Cells(cloC.Row, 7).Left, Top:=Sheet5.Cells(cloC.Row, 7).Top, Width:=Sheet5.Cells(cloC.Row, 7).Width, Height:=Sheet5.Cells(cloC.Row, 7).Height
me.show vbmodeless or userform4.show vbmodeless
textbox3.setfocs //EXECUTES THIS LINE BUT GOES TO SHEET5 AND CLOSES THIS USERFORM FORCIBILY \\not working
end sub//STOPS HERE
....... i HAVE CODE