Hi guys,

I'm having some difficulty in excel when I'm executing a userform. The userform can be triggered by three different buttons. In a worksheet I have the data that should be displayed in the userform depending on which button it is accessed from.

My code looks like this:

Please Login or Register  to view this content.
The problem is that when I try to access the userform, it immediately gives me the error mentioned in the title (Automation error; the object invoked has disconnected from its clients) and Excel crashes
and exits. Excel seems to be struggling with this line: Me.txt_dem0.Text = Range("StepSelected").Cells(1, 1).Offset(0, 4).Value

I can't see why this line is giving any trouble - the value in the cell that is referred to can be entered as a text so it shouldn't give any problems.

any ideas or suggestions would be greatly appreciated.

Kind regards