Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,203
Default selection.text erro 1004

One of the big changes in 2007 was the whole family of shapes and the
graphics engine in general.

To run in both 2007 and earlier versions, you'll need to test for the
version of Excel that the file is running on and switch tracks accordingly.

If Range_maxmej = True Then
logicsheetmej.Shapes(xyz).GroupItems(12).Select
If Val(Application.Version)=12 then
'Excel 2007 or later
Selection.Text = Importsheetmej.Cells(imej, 11)
Else
'pre 2007 version of Excel
Selection.Characters.Text = ImportSheetmej.Cells(imej,11)
End If
End If

I haven't tested this and you may have to include the selection of the shape
within the IF..Then...Else block as I'm not sure how Excel 2003 will deal
with the .GroupItems(12). parameter.
"perf" wrote:

Hi all,
I am experiencing a problem that is drving me crazy...

I have this portion of code in excel 2007, where I decide to change the text
of the 12th element of a group of shapes (line and text box)

If Range_maxmej = True Then
logicsheetmej.Shapes(xyz).GroupItems(12).Select
Selection.Text = Importsheetmej.Cells(imej, 11)
End If

logicsheetmej and Importsheetmej are defined as sheets.

this code in office 2007 works perfectly, absolutely no problem

Now, i have also to make possible to use it in excel 2003. and it does not
work anymo Selection.Text = Importsheetmej.Cells(imej, 11) gives me a
1004 error "unable to set the text property"

why is this happening?

thanks in advance

marco

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
HELP --- 1004 Application-defined or object-defined erro Jan Hammel Excel Programming 3 April 26th 07 11:36 PM
Selection.sort Run-time error '1004' [email protected] Excel Programming 2 October 19th 06 12:24 PM
Runtime error 1004- application defined or object defined erro Novice Excel Programming 0 February 6th 06 09:34 PM
Runtime error 1004- application defined or object defined erro Novice Excel Programming 1 February 6th 06 09:33 PM
Runtime error 1004- application defined or object defined erro Jim Thomlinson[_5_] Excel Programming 0 February 6th 06 09:29 PM


All times are GMT +1. The time now is 03:53 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"