2016-11-26 12 views
1

アイテムをPDFにエクスポートすると、現在メッセージが表示されます。ドロップダウンから(xのyをエクスポートする)のx値を表すアイテムの合計量を取得したい現在、修正値があります。ドロップダウンリストの項目数を変数に設定する

Const SAVE_PATH = "C:\SC\" 

Sub SCtoPDF() 
    Dim inputRange As Range 
    Dim cell As Range 

    Set inputRange = Evaluate(Range("G11").Validation.Formula1) 

    For Each cell In inputRange 
     If cell.Value <> "" Then 
      counter = counter + 1 
      Application.StatusBar = "Exporting Scorecard: " & counter & " of " & "32" 

      [G11] = cell.Value 
      ActiveSheet.Calculate 
      ActiveSheet.ExportAsFixedFormat _ 
       Type:=xlTypePDF, _ 
       Filename:=SAVE_PATH & cell.Value, _ 
       Quality:=xlQualityStandard, _ 
       IncludeDocProperties:=True, _ 
       IgnorePrintAreas:=False, _ 
       OpenAfterPublish:=False 
     End If 
    Next cell 
End Sub 
+0

?どこ? –

+0

'G11'の内容は何ですか? – CMArg

答えて

0

何の検証リストの行が空でないと仮定すると:どのようなドロップダウン

inputRange.Rows.Count 
関連する問題