ネットに転がっているプログラムは、無駄に長いので使わない方がいいです。
自由度を上げけるためには、VBA で行う事は必要最低限にして、他はのセルの書式設定等Excel の機能を使います。
以下はA1に数字のみを設定します。
51~60を印刷したい時は 51-60と入力します。
1枚印刷するときは、51の様に数字だけ入力してもいいです。
Option Explicit
'
Sub Macro1()
Dim IBox As String
Dim Ins As Integer
Dim Page As Integer
'
IBox = InputBox(\u0026quot;開始番号-終了番号\u0026quot;, \u0026quot;印刷\u0026quot;, \u0026quot;1-1\u0026quot;)
If IBox = \u0026quot;\u0026quot; Then
End
End If
'
Ins = InStr(IBox \u0026amp; \u0026quot;-\u0026quot;, \u0026quot;-\u0026quot;)
Page = Left(IBox, Ins - 1)
Ins = InStr(IBox, \u0026quot;-\u0026quot;)
Application.ScreenUpdating = False
'
For Page = Page To Mid(IBox, Ins + 1)
[A1] = Page
ActiveSheet.PrintOut
Next Page
End Sub
A1の数字の前に「Company-」を入れたいなら、
セルの書式設定、ユーザー定義「\u0026quot;Company-\u0026quot;0」
にして下さい。