Run-time Error 70 - Permission Denied when assessing shape line colour

Zakkala

Active Member
Joined
Nov 12, 2004
Messages
254
Hi there,

I've got the following code that's erroring out on the bold underlined row - I get a Permission Denied (run time error 70) problem. I think this ran okay under Excel 2000 but can't be sure as I was still mid testing phase, but now I've upgraded to 2003 I've got a feeling this might be part of the problem. Any suggestions gratefully received.

Rich (BB code):
For j = Worksheets("Business").Shapes.count To 1 Step -1
        
            If Worksheets("Business").Shapes(j).Name = mynewdirector Then
                                                       
                If Worksheets("Business").Shapes(j).Fill.ForeColor.SchemeColor <> 17 And Worksheets("Business").Shapes(j).Fill.ForeColor.SchemeColor <> 22 = True Then
                
                    myfillcolor = Worksheets("Business").Selection.ShapeRange.Fill.ForeColor.SchemeColor
                    
                    GoTo nextstep
                    
                End If
                                         
                Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 24 Then
                                                                    
                    myfillcolor = 31
                                                            
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 1 Then

                    myfillcolor = 3
                                 
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 19 Then

                    myfillcolor = 21
                                    
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 17 Then

                    myfillcolor = 19
        
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 36 Then

                    myfillcolor = 33
    
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 20 Then

                    myfillcolor = 11
    
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 34 Then

                    myfillcolor = 26
    
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 16 Then

                    myfillcolor = 47
        
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 23 Then

                    myfillcolor = 40
        
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 30 Then

                    myfillcolor = 27
       
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 33 Then

                    myfillcolor = 45
    
                ElseIf Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor = 49 Then

                    myfillcolor = 31
                       
                End If
                    
nextstep:
                                        
                 mylinecolor = Worksheets("Business").Shapes(j).Line.ForeColor.SchemeColor
            
             End If
                         
        Next j
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
SOLVED Re: Run-time Error 70 - Permission Denied when assessing shape line colour

Okay, I seem to have sorted it.

After much heartache it would seem that Excel 2003 does not recognise one of the outline colours I had chosed in Excel 2000.

Once I went through and changed the outline colour on all the shapes that had it to one that looks the same, but is chosen from the right-click format pallette in 2003, everything ran happily.

I am now off for a stiff drink.
 
Upvote 0

Forum statistics

Threads
1,214,959
Messages
6,122,476
Members
449,087
Latest member
RExcelSearch

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