2016-04-22 86 views
0

我不斷收到消息運行時錯誤「1004」:方法「範圍」的object'_Global「:選擇表格打印

運行時錯誤‘1004’:方法對象的範圍」 '_全局失敗

我試圖只能通過複選框選擇表單打印。 這裏是我必須打印只複選框被選中的形式代碼:

Sub PrintForms() 

    If Range("PrintClientInfo").Value = True Then 
     Call PrintClientInfo 
    End If 

    If Range("PrintInitialCheque").Value = True Then 
     Call PrintInitialCheque 
    End If 

    If Range("Print3102Form_Page_1").Value = True Then 
     Call Print3102(1) 
    End If 

    If Range("Print3102Form_Page_2").Value = True Then 
     Call Print3102(2) 
    End If 

    If Range("Print3102Form_Page_3").Value = True Then 
     Call Print3102(3) 
    End If 

    If Range("Print3102Form_Page_4").Value = True Then 
     Call Print3102(4) 
    End If 

    If Range("Print3102_localprintout").Value = True Then 
     Call Print3102Form_Localprintout 
    End If 

    If Range("PrintDeclaration").Value = True Then 
     Call PrintDelcaration 
    End If 

End Sub 

所有其他工作,但這個錯誤似乎是:對於

If Range("Print3102_localprintout").Value = True Then 

我有一個名爲範圍他們全部。 任何人都可以幫忙嗎?

回答

0

我只能猜測,因爲我不知道你的命名範圍,也沒有你的功能。

你的模式似乎是命名像你的函數/潛艇的範圍。你有沒有檢查範圍Print3102_localprintout是否真的存在?難道是Print3102Form_Localprintout

相關問題