2011-03-29 7 views
1

GUI 용도로 몇 가지 VBA 코드를 작성했지만 셰이프가 인쇄되지 않도록하려고합니다. 이 쉐이프를 동적으로 만들므로 각 쉐이프를 수동으로 인쇄하지 않도록 설정할 수는 없습니다. 프로그래밍 방식으로이를 수행 할 수있는 방법이 있습니까?Excel/VBA : 도형이 인쇄되지 않도록 설정할 수있는 도형 속성이 있습니까?

Set roundedRec = ws.Shapes.AddShape(msoShapeRectangle, 10, 10, 10, 10) 

    roundedRec.Name = shapeName 

    With roundedRec 
    .Fill.Visible = msoFalse 
    .Line.ForeColor.RGB = RGB(0, 204, 0) 
    .Line.Style = msoLineThinThin 
    .Width = target.Width + 4 
    .Left = target.Left - 2 
    .Height = target.Height + 4 
    .Top = target.Top - 2 
    .ZOrder (msoSendToBack) 
    ' need a way to set the shape to NOT print...? 
    end with 

답변

5
.ControlFormat.PrintObject = False 

관련 문제