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

請您先登陸,再發跟帖!