Question

Locked

MS Excel / Visual Basic

By john.hart ·
I wrote:

Sub SomePilot()
M = Format(Now, "MMM")
Application.ScreenUpdating = False
M = InputBox("Input month you would like to print.", "Month Entry", M)
Worksheets("162 PILOT").Select
Cells(1, 15).Font.Size = 20
Cells(1, 15) = M
Cells(4, 1).Font.Size = 20
Cells(4, 5).Font.Size = 20
Cells(4, 11).Font.Size = 20
a = Cells(1, 36).Value
Cells(4, 1) = Cells(a, 33)
Cells(4, 5) = Cells(a, 34)
Cells(4, 11) = Cells(a, 35)
Worksheets("162 PILOT").PrintOut
Cells(4, 1) = " "
Cells(4, 5) = " "
Cells(4, 11) = " "
Cells(1, 15) = " "
Sheets("Inputs").Select
Range("A4").Select
Application.ScreenUpdating = True
End Sub

I assumed when you used an input box function the cancel button would cancel the operation instead it returns a null value and proceeds through the rest of the code.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums