Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 causes error with Excel 2000 VBA code


I have worsheets that used to work with Excel 2000 and now cause error
since I upgraded to Excel 2003.

I get the following error when I run the macro;

Run-time error '-2147467259 (80004005)':
Method 'Select' of object 'Shape' Failed

From the following line of code;
ActiveSheet.Shapes ("Rectangle 7") .Select

Any suggestions

--
darthrade
-----------------------------------------------------------------------
darthrader's Profile: http://www.excelforum.com/member.php...fo&userid=3635
View this thread: http://www.excelforum.com/showthread.php?threadid=56146

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Excel 2003 causes error with Excel 2000 VBA code

I have noticed many subtle differences in working with code from 2000 and
from 2003, usually just more or less options per function. Your code here
appears correct, and it worked when I tried it. Are you sure your shapes are
named the way the code assumes they are?

Pflugs

"darthrader" wrote:


I have worsheets that used to work with Excel 2000 and now cause errors
since I upgraded to Excel 2003.

I get the following error when I run the macro;

Run-time error '-2147467259 (80004005)':
Method 'Select' of object 'Shape' Failed

From the following line of code;
ActiveSheet.Shapes ("Rectangle 7") .Select

Any suggestions?


--
darthrader
------------------------------------------------------------------------
darthrader's Profile: http://www.excelforum.com/member.php...o&userid=36359
View this thread: http://www.excelforum.com/showthread...hreadid=561465


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 causes error with Excel 2000 VBA code


I believe so. The code is complicated and was written a while ago by
someone else in the company. I am trying to make it work on 2003. It
runs perfectly on Excel 2000. Does not make sense to me.

Thank you


--
darthrader
------------------------------------------------------------------------
darthrader's Profile: http://www.excelforum.com/member.php...o&userid=36359
View this thread: http://www.excelforum.com/showthread...hreadid=561465

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Excel 2003 causes error with Excel 2000 VBA code

How about the rest of the code? Can you step through it to follow what it's
doing? If so, try recording a macro doing the tasks the code is supposed to
do. Then copy and paste that into the correct spot in the code.

I have run into this exact situation myself, and sometimes this
bass-ackwards way actually solves the problem.

Pflugs

"darthrader" wrote:


I believe so. The code is complicated and was written a while ago by
someone else in the company. I am trying to make it work on 2003. It
runs perfectly on Excel 2000. Does not make sense to me.

Thank you


--
darthrader
------------------------------------------------------------------------
darthrader's Profile: http://www.excelforum.com/member.php...o&userid=36359
View this thread: http://www.excelforum.com/showthread...hreadid=561465


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 causes error with Excel 2000 VBA code


The program is opening data files and importing the data. It is usin
the rectangle to creates buttons on the new sheet.

I am very rusty with VBA but will take time to brush up on it to ge
this to work.

I know the code is good because it works on Excel 2000. I had t
unprotect the sheets and unprotect the VBA code for this to work o
Excel 2003. I wonder if this has something to do with it.

Regards

--
darthrade
-----------------------------------------------------------------------
darthrader's Profile: http://www.excelforum.com/member.php...fo&userid=3635
View this thread: http://www.excelforum.com/showthread.php?threadid=56146



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 causes error with Excel 2000 VBA code


I believe the problem is unrelated to this line of code. If I remove i
the program stop on another line with a similar error.
Another error I get is that the range of cells on I am trying to acces
is protected. I do not get any of these errors with the same file o
Excel 2000.

Is there any special work that needs to be done to convert workbook
when going to Excel 2003

--
darthrade
-----------------------------------------------------------------------
darthrader's Profile: http://www.excelforum.com/member.php...fo&userid=3635
View this thread: http://www.excelforum.com/showthread.php?threadid=56146

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel 2003 causes error with Excel 2000 VBA code

Hi Darthrader:
I have seen some other replies but maybe my experience could also help.
I have had userforms with file handling routines that worked fine in Excel
2000 go wrong in 2003, and even more weirdly they would work until I opened
them on a machine running 2003, work there and then not work anymore for
users running Excel 2000. The problem turned out to be in the references;
when opened in 2003 it reset references to the new libraries, which then were
not found by 2000.

We finally gave up and maintained two separate sets until everyone in the
Company upgraded to Office 2003.

"darthrader" wrote:


I have worsheets that used to work with Excel 2000 and now cause errors
since I upgraded to Excel 2003.

I get the following error when I run the macro;

Run-time error '-2147467259 (80004005)':
Method 'Select' of object 'Shape' Failed

From the following line of code;
ActiveSheet.Shapes ("Rectangle 7") .Select

Any suggestions?


--
darthrader
------------------------------------------------------------------------
darthrader's Profile: http://www.excelforum.com/member.php...o&userid=36359
View this thread: http://www.excelforum.com/showthread...hreadid=561465


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
Strange 'protected cell' error affecting Excel 2003 but not Excel 2000? Pheasant Plucker® Excel Discussion (Misc queries) 1 April 10th 07 01:04 PM
Run time error : Excel 2000 and Excel 2003 : different behavior of Macro Bala[_2_] Excel Programming 2 May 23rd 06 05:15 AM
Web query excel 2003 not good for Excel 2000 code Dave[_60_] Excel Programming 1 February 23rd 06 07:02 AM
VBA Code works in Excel 2003 but won't work in Excel 2000 aglazer Excel Programming 2 September 5th 05 03:52 PM
VBA Code works in Excel 2003 but won't work in Excel 2000 [email protected] Excel Programming 0 September 5th 05 09:05 AM


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