Hey guys,
I want to write a VBA that would do following actions:
1. refresh all pivot tables* in the workbook
2. If one of following actions occur, send a notification via email and close the workbook
a) if the table on server doesn't exist
b) if the table contains more rows that are capabilities of Excel
*pivot tables are connected to external tables on our servers.
I don't want you to write the entire code, I would just ask for couple of advice:
1. Is it possible to do without super advance programming skills
2. How to identify that there is a problem with refreshing table?
3. Could you recommend me any website/(or less favorable book) where I can learn how to create such a VBA.
ad2. Right now, when I use simple code like:
Excel doesn't give me any notification in any situations a) or b). It pretends that it refreshed all tables correctly. So I don't know how to identify that I had problem with refreshing.
On the other hand, when I use "Refresh All" from toolbar on the same file I have notifications like: "Problems obtaining data" and so on.
Thanks in advance for giving me some guidelines how to solve this issue.
Regards,
Matt
I want to write a VBA that would do following actions:
1. refresh all pivot tables* in the workbook
2. If one of following actions occur, send a notification via email and close the workbook
a) if the table on server doesn't exist
b) if the table contains more rows that are capabilities of Excel
*pivot tables are connected to external tables on our servers.
I don't want you to write the entire code, I would just ask for couple of advice:
1. Is it possible to do without super advance programming skills
2. How to identify that there is a problem with refreshing table?
3. Could you recommend me any website/(or less favorable book) where I can learn how to create such a VBA.
ad2. Right now, when I use simple code like:
Code:
Sub MAJ()ActiveWorkbook.RefreshAll
End Sub
Excel doesn't give me any notification in any situations a) or b). It pretends that it refreshed all tables correctly. So I don't know how to identify that I had problem with refreshing.
On the other hand, when I use "Refresh All" from toolbar on the same file I have notifications like: "Problems obtaining data" and so on.
Thanks in advance for giving me some guidelines how to solve this issue.
Regards,
Matt