R
Rachel
Hi,
Is it possible to print a named range of data excel (the data is in a
hidden sheet)
My named ranges are "Filtered_Data" which is in the "Working" sheet
and "Data_Table" which is in a hidden sheet called "Data", depending
on what a listbox row source is I want to print one or these ranges to
a default printer. My code is below:
Private Sub cmd_print_Click()
Dim Response As VbMsgBoxResult
If ListBox2.RowSource = "Filtered_Data" Then
'code here to print "Filtered_Data" range
Else
Response = MsgBox("No data has been filtered, do you want to print
all data?", vbQuestion + vbYesNo)
If Response = vbNo Then Exit Sub
'code here to print "Data_Table" range
MsgBox "All data has been sent to the printer.", vbInformation
End If
End Sub
Any help would be greatly appreciated!
Rachel
Is it possible to print a named range of data excel (the data is in a
hidden sheet)
My named ranges are "Filtered_Data" which is in the "Working" sheet
and "Data_Table" which is in a hidden sheet called "Data", depending
on what a listbox row source is I want to print one or these ranges to
a default printer. My code is below:
Private Sub cmd_print_Click()
Dim Response As VbMsgBoxResult
If ListBox2.RowSource = "Filtered_Data" Then
'code here to print "Filtered_Data" range
Else
Response = MsgBox("No data has been filtered, do you want to print
all data?", vbQuestion + vbYesNo)
If Response = vbNo Then Exit Sub
'code here to print "Data_Table" range
MsgBox "All data has been sent to the printer.", vbInformation
End If
End Sub
Any help would be greatly appreciated!
Rachel