Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default Use of macros on spreadhseet copies

I have a spreadsheet with quite a few macros defined. All the macros work
with the original sheet. However, when I create a copy of the sheet in the
same workbook, this macro statement crashes:


"ActiveSheet.Shapes(Cell(i,32).Value).IncrementLef t 660"

The value of the index (Cell(i,32).Value) is a string and is defined;
ActiveSheet.Shapes with that index cannot be found in the copied sheet.

Help!

--
VB Amateur
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Use of macros on spreadhseet copies

hape names will change when you copy a sheet if you use the default shapes name

I put 3 rectangles on a sheet and the default names were
Rectangle 1
Rectangle 2
Rectangle 3

I then deleted rectangle 2. Next I copied the sheet to a new sheet. The
new sheet had

Rectangle 1
Rectangle 2

Excel rename Rectangle 3 to rectangle to on the new sheet.

I then repeated the experiment by rename the rectangles MyRect1 and MyRect3.
when the sheet was copied the names of the rectangles again were changed

MyRect1
MyRect2

Finally I put a number at the middle instead of the end and the names didn't
change.

My1Rect
My3Rect



"Wayne" wrote:

I have a spreadsheet with quite a few macros defined. All the macros work
with the original sheet. However, when I create a copy of the sheet in the
same workbook, this macro statement crashes:


"ActiveSheet.Shapes(Cell(i,32).Value).IncrementLef t 660"

The value of the index (Cell(i,32).Value) is a string and is defined;
ActiveSheet.Shapes with that index cannot be found in the copied sheet.

Help!

--
VB Amateur

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
Greyed out area on the spreadhseet zen Excel Discussion (Misc queries) 4 June 19th 08 08:31 PM
Reset Bottom of an Excel spreadhseet akkrug New Users to Excel 1 May 22nd 08 10:10 PM
2 copies of my spreadhseet open! confused Excel Worksheet Functions 1 July 6th 06 05:44 PM
how to put the subtotal of the sum and count in one spreadhseet? SM Excel Worksheet Functions 1 February 1st 06 09:01 AM
subtotal of sum and count in one spreadhseet? SM Excel Worksheet Functions 1 February 1st 06 09:01 AM


All times are GMT +1. The time now is 09:04 AM.

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"