Good Day, I have a macro to print named ranges which are entered in a message box. I would like to use a drop down list to select the ranges from so as to eliminate errors due to typo errors. I know how to populate and validate the range names for the drop down list but do not know how to incorporate this into my macro for printing?
The named ranges are names of months - Mar to Dec each range consisting of 20 values. The drop down list is populated with the names of the months and I want to choose a range to print from the drop down list.
The first part of the macro is as follows:-
Option Explicit
Sub PrintResults()
'
' Keyboard Shortcut: Ctrl+Shift+Q
'check functionality status
Dim PrintRange As String
Dim screenUpdateState
screenUpdateState = Application.ScreenUpdating
Application.ScreenUpdating = False 'turn off screen updating to stop flicker & increase speed
ActiveSheet.Unprotect Password:="1234"
PrintRange = InputBox("range to print") 'Input box asks for named range then prints the range you entered
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$4"
.PrintTitleColumns = ""
End With
Etc, etc
I would be most grateful for some help here.
Regards
Bookmarks