macro (not working in 03 excel)

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
hello

is there a way possible for the macro to work in excel 2003? i tried to run this macro on a older computer that had excel 03 and it didnt appear to work. any idea why?

Code:
Option Explicit
Sub SetShapeReferences()

    Dim shp As Drawing
    Dim i As Integer
    
    i = 1
    For Each shp In ActiveSheet.Drawings
         shp.Formula = "=" & ActiveSheet.Range("S6").Offset(i, 0).Address
         i = i + 1
    Next shp
    
End Sub

it does not show any error or nothing! :S
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
What do you have in cells S7, S8, S9, etc?

How many drawings do you have in your sheet?

Insert the following line immediately after your Dim statements:-
Code:
MsgBox "There are " & ActiveSheet.Drawings.Count & " drawings in " & ActiveSheet.Name
and insert this immediately after the For statement:-
Code:
MsgBox "Shape " & shp.Name & " is " & shp.Height & "x" & shp.Width

Then run it again. What message boxes do you get?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,729
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top