Thread: [Solved] Message Box Restriction
View Single Post
 
Old 03-22-2012, 11:17 AM
Catalin.B Catalin.B is offline Windows Vista Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Why don't you give all the details from the begining?
All you need to do is to insert a validation line:
Code:
Tablenum = Application.InputBox("Enter Old Style Division Number, a number from 1 to 9:", Title:="Numbers", Default:=1, Type:=1)
If Tablenum < 1 Or Tablenum > 9 then 
MsgBox "Not valid!"
Exit Sub
End if
ActiveSheet.PivotTables("PivotTable6").PivotFields  ("DIV").CurrentPage = Tablenum
Reply With Quote