View Single Post
 
Old 08-15-2021, 04:40 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Add this line (shown in Red) into the Sub you already have
Code:
  strPage = InputBox("Enter the page numbers of pages to be deleted: " & vbNewLine & _
            "use comma to separate numbers", "Delete Pages", "For example: 1,3")
  strPage = funExpandDashes(strPage)
  nSplitItem = UBound(Split(strPage, ","))
You should make the above change to what you already had shown in the first post.
The Function I provided goes either before or after all the code you had. You can delete the short test sub I provided - it isn't necessary.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote