Link to home
Start Free TrialLog in
Avatar of MadIce
MadIce

asked on

Zorder issue when calling excel shape.

Whats wrong with the second line of code from the following:

oChart.Shapes.Item("Text Box 4").Select()
 oExcel.Application.ActiveWindow.Selection.ShapeRange.ZOrder = Microsoft.Office.Core.MsoZOrderCmd.msoBringToFront
I get a "member not found" error which I believe is for the Zorder.  I want to move a text box on my chart to the front. Thanks in advance
Avatar of lfcbc75
lfcbc75
Flag of Brazil image

For a better understanding of your problem, paste here more of your code, or upload your spreadsheet if its possible.
The syntax shown seems to invalid...
Avatar of byundt
Does it work if you use an explicit value for the Z-order?
 oExcel.Application.ActiveWindow.Selection.ShapeRange.ZOrder = 0        'msoBringToFront = 0
Avatar of MadIce
MadIce

ASKER

byundt, I tried using explicit value. same issue.  
lfcbc75, the code is not on the spreadsheet side. Not sure what other code would be useful. There is too much to add but here is some of it.

        Dim oExcel As Excel.Application
        Dim oSheet As Excel.Worksheet
        Dim oWrkBook As Excel.Workbook
        Dim oChart As Excel.Chart
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MadIce

ASKER

byundt, That did the trick. Thanks alot. I thought I was going to have to do this a different way.