below code prompts a user to enter a column number, this column then gets subsequently deleted on all tables (all of them have identical numbers of columns).
I would like to have a better inputbox error handling, i.e. ...
(1) just integers greater than 0 are allowed as entry
(2) If an integer greater than the maximum count of columns is entered, a msgbox should say that the number entered is greater than the max. number of columns and the inputbox is to re-appear.
Help is much appreciated. Thank you very much in advance.
Dim tbl As Table
Dim ColumnNumberDelete As String
'Just numbers are allowed and the number should be between 1 and maximum count of columns)
Application.ScreenUpdating = False
ColumnNumberDelete = Inputbox("Which column number is to be deleted?", "Deletion of Column")
If ColumnNumberDelete = "" Then Exit Sub
For Each tbl In ActiveDocument.Tables