S
shahzad4u_ksa
Hi,
I have a userform with some textboxes and comboboxes to get view the
information by selecting by textboxes and cobos. and have a
BuildReport button to find and filter the records from worksheet.
buttons are like this:
Filter Criteria:
============
1 CoboCategory:
2 CoboLocation:
3 CoboSection:
4 TxtDate:
And I have a button
Private Sub BuildReport_Click()
Sheets("Purchase").Select
Range("AT5:BH65500").Select
Selection.Copy
Sheets("RepPurchase").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("RepPurchase").Range("H1") = CoboSection.Value
' ===========================================
Sheets("Purchase").Select
Range("A1").Select
End Sub
I am using the above code to copy the filtered data to "RepPurchase"
sheet
Now the problem is this if I will use the above command then H1 shows
the name of the Section which I select, and If I select the
CoboCategory or CoboLocation how to show the different critaria in H1
as Heading of the Report.
Please help me to prepare heading for the searched critaria.
Thanks and regards.
Shahzad
KSA.
I have a userform with some textboxes and comboboxes to get view the
information by selecting by textboxes and cobos. and have a
BuildReport button to find and filter the records from worksheet.
buttons are like this:
Filter Criteria:
============
1 CoboCategory:
2 CoboLocation:
3 CoboSection:
4 TxtDate:
And I have a button
Private Sub BuildReport_Click()
Sheets("Purchase").Select
Range("AT5:BH65500").Select
Selection.Copy
Sheets("RepPurchase").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("RepPurchase").Range("H1") = CoboSection.Value
' ===========================================
Sheets("Purchase").Select
Range("A1").Select
End Sub
I am using the above code to copy the filtered data to "RepPurchase"
sheet
Now the problem is this if I will use the above command then H1 shows
the name of the Section which I select, and If I select the
CoboCategory or CoboLocation how to show the different critaria in H1
as Heading of the Report.
Please help me to prepare heading for the searched critaria.
Thanks and regards.
Shahzad
KSA.