Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a Text Box on Sheet2 assigned to the following macro...
Public Sub CheckTextFit() Dim K As Long, StrText As String With Worksheets("Sheet2").Shapes(Application.Caller) .TextFrame.Characters.Text = "" StrText = ActiveCell.Value Do .TextFrame.Characters(Start:=K * 255 + 1, Length:=255).Text _ = Mid(StrText, K * 255 + 1, 255) K = K + 1 Loop While K * 255 < Len(StrText) End With End Sub When I click the text box, in XL2003, the code transfers the contents of the active cell into the text box in lots of 255 characters . In XL2007 I get Run-time error '1004' Application-defined or object- defined error, and this line is highlight... .TextFrame.Characters(Start:=K * 255 + 1, Length:=255).Text _ = Mid(StrText, K * 255 + 1, 255) There is no worksheet or workbook protection. Any ideas? Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
XL2007 and XL2003 | Excel Discussion (Misc queries) | |||
Upgrade options from XL2003/VBA/VB6 to XL2007/VB.NET ... | Excel Programming | |||
Run-Time Error 1004 When Running Pivot Table Code | Excel Programming | |||
XL2007 vs XL2003 | Excel Programming | |||
Code Run-time error '1004' | Excel Programming |