Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
2003 vba in 2007
I am using the following code in excel 2003. It works fine. When I try to use
the file in 2007 I get this error: Run-time error '1004': "Unable to get the Characters property of the TextBox class" This code is highlighted in yellow: txtBox1.Characters(Start:=startPos, _ Length:=Len(cell.Value)).Text = cell.Value & Chr(10) Why does it work in 03 but not 07? Here is more of the code: I am using it to fill a textbox with data validation/help info Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$A$12" Then txtBox1.Text = " " Set theRange = Worksheets("Help").Range("B37:B41") txtBox1.Visible = msoTrue startPos = 1 For Each cell In theRange txtBox1.Characters(Start:=startPos, _ Length:=Len(cell.Value)).Text = cell.Value & Chr(10) startPos = startPos + Len(cell.Value) + 1 Next cell Else End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 & 2003 - Default open with 2003 | Excel Discussion (Misc queries) | |||
Excel 2007 Macro Help (Excel 2003 not working in 2007) | Excel Discussion (Misc queries) | |||
Different in 2007 vs 2003 | Charts and Charting in Excel | |||
when 2007 is installed side-by-side with 2003, open xls with 2003 | Setting up and Configuration of Excel | |||
2003 and 2007 | Excel Discussion (Misc queries) |