fedepede21
New Member
- Joined
- Aug 5, 2014
- Messages
- 1
Hi folks,
I'm new to this forum and an intermediate level user of Excel and VBA.
I have made a rather simple code in my Excel 2010 workbook/VBA project to print one sheet and at the moment I continuingly run into this nasty problem:
Excel occasionally gives me (only sometimes!) the error message "the object invoked has disconnected from its clients", and shuts down.
I have tried to look my problem up and find that I should use the Option Explicit on top of my code - only problem is that it is already there.
The code that I use is:
The sub is run from a commandbutton on a userform that temporarilly puts the text from a textbox on the userform to a textbox on a hidden sheet to print it.
Any suggestions would be greatly appreciated!
I'm new to this forum and an intermediate level user of Excel and VBA.
I have made a rather simple code in my Excel 2010 workbook/VBA project to print one sheet and at the moment I continuingly run into this nasty problem:
Excel occasionally gives me (only sometimes!) the error message "the object invoked has disconnected from its clients", and shuts down.
I have tried to look my problem up and find that I should use the Option Explicit on top of my code - only problem is that it is already there.
The code that I use is:
Code:
Private Sub Printtext_Click()
Ark11.Visible = True
Ark11.TextBox1 = ""
Ark11.TextBox1 = Me.LegText
Ark11.PrintOut
Ark11.TextBox1 = ""
Ark11.Visible = xlSheetVeryHidden
End Sub
The sub is run from a commandbutton on a userform that temporarilly puts the text from a textbox on the userform to a textbox on a hidden sheet to print it.
Any suggestions would be greatly appreciated!