Hello ExcelFox Forum users. My first post, how exciting.
OK well I am a beginner i'm afraid so I hope I don't dumb down the water of this site too much 
I don't work with code but at work I have created many spread sheets in order to keep a record of international shipments coming into the UK.
I have written many Macros and formulas on these spreadsheets but Im just having one problem I cant seem to get on top of. I would be very grateful if you kind people would help me.
My spreadsheet has a column which is shows a date. This date is when the container delivered to the customer in UK. I run a macro triggered by a button which filters the column to the current date. Therefore when run on the date of delivery is shows "Deliveries for today" This is fine but when there are no deliveries that day i.e. today's date is not in any cell in this specific column then it filters and nothing is displayed. Because the spreadsheet goes out to the customer I think this looks a little messy. Instead, if there are no deliveries on the day I would like the 'msgbox' to pop up and say "there are no deliveries today" instead of just filtering so it just shows empty, non active rows. I have tries many bits of code over the last few weeks but can't get any to work.
My code for the filter is below. I need perhaps an 'If' statement so if after filter this is no active rows then msgbox "No deliveries today"
Code:
Sub todaysdels()
dDate = Date
Range("A2").AutoFilter field:=20, Criteria1:=dDate
End Sub
I hope I have explained correctly. Thanks.
Xander1981
Bookmarks