Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel textbox problem

OK I have a textbox problem. It only happens every few days or so, but
unfortunately after the error occurs (-2147417848 Method 'Insert' of
object 'Characters' failed), the textbox becomes corrupt. By this I
mean that if you use the down arrow to go to the end of the textbox,
the cursor freezes, and I have to use Ctrl-Alt-Del. There is no
obvious sign of corruption in the textbox (n.b. a textbox from the
drawing toolbar) - until I enlarge it. Then I can see little boxes
then text taken from the data validation input messages, i.e garbage.
To fix the problem I have to copy all the text by hand as selecting it
all causes a crash, plus recreate the sheet, so this is a real
problem. Here is the crashing code:

Sub warningtext_RENTED_ARREARS_NO_PROPERTY_ADD(textbox name)

Dim t1 As String
Dim t2 As String
Dim t3 As String
Dim t4 As String
Dim t5 As String
t1 = "THIS TENANT'S BOND DOES NOT COVER THEIR ARREARS, "
t2 = " WEEK'S NOTICE AND A $"
t3 = " ALLOWANCE FOR CLEANING AND DAMAGE. THEY HAVE NO SEIZABLE
PROPERTY, "
t4 = "SO SHOULD BE EVICTED. IF THEY LEAVE TODAY, YOU WOULD LOSE "
t5 = " PLUS ANY SHOP ACCOUNT."
startpoint = Len(Range("a1")) + 2
ActiveSheet.Shapes(textboxname).Select
Selection.Characters(Start:=startpoint, Length:=1).Insert _
Chr(10) & t1 & Worksheets("Control Panel").Range("K5") & _
t2 & clean_charge & t3 & t4 & Format(Range("h13"), "$0.00") & t5 &
Chr(10)

Bear in mind that there are many worksheets similar which are updated
several times daily and this happens only now and again.

More info is at:

http://www.experts-exchange.com/Data..._20675019.html
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 08:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 08:03 PM
Excel Textbox aprice1989 Excel Worksheet Functions 0 June 12th 08 03:10 PM
How do I print a textbox in Excel? RiverRoad Excel Discussion (Misc queries) 0 December 8th 05 05:46 PM
Comma in TextBox Problem (Spanish) Jeff B Excel Programming 3 July 11th 03 01:17 AM


All times are GMT +1. The time now is 07:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"