Thread: [Solved] Message Box Restriction
View Single Post
 
Old 03-22-2012, 12:08 PM
excelledsoftware excelledsoftware is offline Windows 7 64bit Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

Quote:
Originally Posted by Catalin.B View Post
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
Ok the validation line is helpful. I will just add a dummy 6 into the table so it will always return a result for 1-9. Ill let you know how it works.
Reply With Quote