copy, past, and modify macro

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 1/28/2005 by alex
'

'
startvalue = InputBox("input start number", "Start Value")
endvalue = InputBox("input end number", "End Value")
If startvalue > endvalue Then
For i = startvalue To endvalue Step -1
Cells(2, 6).Value = i 'B6
'ActiveSheet.PageSetup.Orientation = xlLandscape
ActiveSheet.PrintOut
Next i

Else
For i = startvalue To endvalue
Cells(2, 6).Value = i
'ActiveSheet.PageSetup.Orientation = xlLandscape
ActiveSheet.PrintOut
Next i
End If


End Sub

所有跟帖: 

多谢, 多谢 -Manythank- 给 Manythank 发送悄悄话 (46 bytes) () 01/29/2005 postreply 10:28:05

请您先登陆,再发跟帖!