VB
-
- 2StarLounger
- Posts: 179
- Joined: 30 Sep 2014, 15:18
VB
Hi all,
Thanks for looking at my post. I am wondering ,
1. is there is any way of sending automatic warning email if the excel is not opened for 8 days ?
2. Is it possible to delete the complete spreadsheet once in a year automatically and i would like to get automatic PDF document once the spreadsheet is deleted.
Please help me guys,
Thanks.
Thanks for looking at my post. I am wondering ,
1. is there is any way of sending automatic warning email if the excel is not opened for 8 days ?
2. Is it possible to delete the complete spreadsheet once in a year automatically and i would like to get automatic PDF document once the spreadsheet is deleted.
Please help me guys,
Thanks.
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: VB
Hi,
Not sure about #1
As for #2
I don't think VB will be able to manage this as well as using either the Windows Task Scheduler or a third party application like (for example) Belvedere. As for the PDF file, is that a saved copy of the deleted Excel file, or is it just an info source informing that the file has been deleted. In either event, I doubt that Windwos Task Scheduler or the third party app I referred to could do that!? One could attempt to design a VB (*.exe) procedure to deal with this, but this is beyond the scope of my knowledge.
Not sure about #1
As for #2
I don't think VB will be able to manage this as well as using either the Windows Task Scheduler or a third party application like (for example) Belvedere. As for the PDF file, is that a saved copy of the deleted Excel file, or is it just an info source informing that the file has been deleted. In either event, I doubt that Windwos Task Scheduler or the third party app I referred to could do that!? One could attempt to design a VB (*.exe) procedure to deal with this, but this is beyond the scope of my knowledge.
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: VB
1. Are you interested in the Excel application being opened during the 8 day period? Or a specific workbook?krishnaa_kumarr88 wrote:Hi all,
Thanks for looking at my post. I am wondering ,
1. is there is any way of sending automatic warning email if the excel is not opened for 8 days ?
Please help me guys,
Thanks.
2. Is this specific to a single machine? or is the file of interest available to more users than one -- saved on a server?
Regards
Don
Don
-
- Administrator
- Posts: 78594
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: VB
I think it would be rather complicated. I'd let those responsible for the workbook set up a recurring task or appointment in their Outlook to remind them to look at the workbook.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: VB
Hi Krishnaa
I believe that I see a way forward, but have some more questions that require your input, and assumptions that require your confirmation or clarification.
I believe that I see a way forward, but have some more questions that require your input, and assumptions that require your confirmation or clarification.
- It is assumed that there will be a single administrator who's computer will create the e-mail alerts.
- What version of Excel is the administrator running?
- It is assumed that the administrator is running Outlook.
- Do users other than the 6 or so users of interest (UOI), have access to the file of interest (FOI)?
- Do the UOI have write privileges to the FOI?
- Does anyone other than the UOI and administrator have write privileges to the FOI?
- Are you interested in the UOI's access to the workbook only, or is your real interest in their having activated specific sheets?
- What is the extension on the FOI? (xls; xlsx; xlsm; csv; etc)
- It is assumed that the process to determine if any messages are required will be launched each time the administrator logs-on or launches Excel.
- It is assumed that a nag message will be sent on a daily basis if the UOI has not accessed the appropriate workbook/worksheet(s).
- It is assumed that each of the UOI will have their machines set to allow macros in the FOI to run.
Regards
Don
Don
-
- 2StarLounger
- Posts: 179
- Joined: 30 Sep 2014, 15:18
Re: VB
Hi Don,
1. yes. Single administrator e mail alerts
2. EXcel 2010
3. yes. We running outlook
4. May be. Not exactly 6 users may use it. It might be higher or lower than that
5. yes. UOI will have write privileges to FOI
6. No.
7. UOI access to workbook , not for specific sheets
8. Xls
9. Email should be received after 8 days if specific workbook is not update or not opened for 8 days. Email should be received automatically as we might not know when the user will open the spreadsheet again
10. No. Once in 8 days, if user did not update the excel. If the user update the excel before 8 days than we should not receive email. This should be continuous process
11. yes.
Thanks,
Please help
1. yes. Single administrator e mail alerts
2. EXcel 2010
3. yes. We running outlook
4. May be. Not exactly 6 users may use it. It might be higher or lower than that
5. yes. UOI will have write privileges to FOI
6. No.
7. UOI access to workbook , not for specific sheets
8. Xls
9. Email should be received after 8 days if specific workbook is not update or not opened for 8 days. Email should be received automatically as we might not know when the user will open the spreadsheet again
10. No. Once in 8 days, if user did not update the excel. If the user update the excel before 8 days than we should not receive email. This should be continuous process
11. yes.
Thanks,
Please help
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: VB
The approach I visualize is as follows:
Please review this and let me know if you would like me to proceed with creating the code.
Criticism from any and all Loungers is most welcome.
- Since the administrator may be absent for several days, the notification process will be exercised each time the administrator or one of the UOI open the FOI.
- The FOI will contain a hidden log of usage. This log will contain:
- A list of the username for each UOI (maintained by the administrator);
- The e-mail address for each UOI (maintained by the administrator);
- The salutation for each UOI (maintained by the administrator);
- The date and time each user accessed the FOI (entered automatically when the file is opened by the user);
- The date and time that a message was sent to a delinquent user (entered automatically when the code creates the message)
- The log will be visible only to the administrator
- The process will also be exercised each time the administrator starts his machine or launches excel.
- The process will be as follows when the FOI is opened:
- The date and time of opening the file will be entered against the user in the log;
- The log will be interrogated for each of the UOI for the last access time and date;
- If the last access time for a user exceeds 8 days and the time of the last message generated to that user exceeds 24 hours then:
- A message is sent to the delinquent user and copied to the administrator;
- The date and time is updated in the last message field
- If the last access time for a user exceeds 8 days and the time of the last message generated to that user exceeds 24 hours then:
Please review this and let me know if you would like me to proceed with creating the code.
Criticism from any and all Loungers is most welcome.
Regards
Don
Don
-
- 2StarLounger
- Posts: 179
- Joined: 30 Sep 2014, 15:18
Re: VB
I am really glad to hear that you gonna help me.
Thanks a lot for that.
What you mentioned is absolutely right. I would like to get mail each time when the administrator log his machine provided if the previous update was 8 days before.
Thanks a lot .
Thanks a lot for that.
What you mentioned is absolutely right. I would like to get mail each time when the administrator log his machine provided if the previous update was 8 days before.
Thanks a lot .
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: VB
You have managed to confuse me.krishnaa_kumarr88 wrote:I would like to get mail each time when the administrator log his machine provided if the previous update was 8 days before.
- I have assumed that the only people involved in this process were the UOI and the administrator.
- In this discussion the administrator is the person responsible for whatever maintenance is required on the usage log as well as overseeing the general operation of whatever data gathering and dissemination is intended through the use of the FOI (the work supported by the intended code).
- Please explain exactly what you mean by, "the administrator log his machine".
- You say, "I would like to get mail each time". What role do you play in this scenario?
- UOI?
- UOI with supervisory interest?
- administrator?
- nonparticipating onlooker?
- Am I correct in assuming that the UOI will be updating the data in the FOI?
- Will the administrator be one of those updating data in the FOI? (Yes/No/Possibly)
Regards
Don
Don
-
- 2StarLounger
- Posts: 179
- Joined: 30 Sep 2014, 15:18
Re: VB
Sorry for the confusion
1. Yes for number 1
2. Sorry for the confusion about administrator.
4. I am gonna be non participating onlooker
5. Yes. Uoi will be updating the data in the foi
6. Possibly
Sorry for any inconvenience
Thanks
1. Yes for number 1
2. Sorry for the confusion about administrator.
4. I am gonna be non participating onlooker
5. Yes. Uoi will be updating the data in the foi
6. Possibly
Sorry for any inconvenience
Thanks
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: VB
Hi Krishnaa
Some outstanding questions and a new request:
From post 137159
Some outstanding questions and a new request:
From post 137159
Question 3 from post 137165Don Wells wrote:Is there any chance that any of the UOI will be operating from a different time zone from the administrator?
It would be very useful if you were to describe the workbook and how it is used by the various participants.Don Wells wrote:Please explain exactly what you mean by, "the administrator log his machine".
Regards
Don
Don
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: VB
Hi Krishnaa
The attached workbook should provide your solution, however there are a few tasks that you need to perform first:
The attached workbook should provide your solution, however there are a few tasks that you need to perform first:
- Copy the following code into the 'ThisWorkbook' module of your workbook;
Code: Select all
Private Sub Workbook_BeforeClose(Cancel As Boolean) Call modUsageTracking.End_Proc End Sub Private Sub Workbook_Open() Call modUsageTracking.Start_Proc End Sub
- Copy the two standard modules ('modUsageTracking' and 'Open_Outlook' ), from the attached workbook to your workbook;
- Copy the 'Usage Log' worksheet from the attached workbook to your workbook. On opening the attached workbook the 'Usage Log' worksheet will be hidden; to make it visible run the macro 'Maint_Proc';
- Update the 'Usage Log' worksheet in your workbook as follows:
- Clear all entries in rows 2:4
- For each user:
- Enter the username in Column A. It is very important that this be exactly as found on the user's machine as one of the folders in 'C:\Users'
- Enter the user's e-mail address in Column B;
- Select the appropriate role from the pulldown list in Column C;
- In Column D enter the salutation to be used in the e-mail message;
- Leave Columns E & F blank as they will be populated automatically.
You do not have the required permissions to view the files attached to this post.
Regards
Don
Don
-
- Administrator
- Posts: 78594
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: VB
The check for the number of days is in the line
You can change this to
Code: Select all
If Now - .Cells(RoI, 5) > 8 And Now - .Cells(RoI, 6) > 1 Then
Code: Select all
If Now - .Cells(RoI, 5) > TimeValue("0:05") And Now - .Cells(RoI, 6) > TimeValue("0:05") Then
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 179
- Joined: 30 Sep 2014, 15:18
Re: VB
BRILLIANT WORK. BUT THE PROBLEM IS I AM GETTING MAIL ONLY AFTER OPENING SPREADSHEET. BUT I WOULD LIKE TO GET MAIL EVEN BEFORE OPENING THE SPREADSHEET.
THAT IS IF THE SPREADSHEET IS NOT OPENED FOR 5 MIN AND I SHOULD GET AUTOMATIC EMAIL SAYING THAT I FORGOT TO UPDATE SPREADSHEET/FORGOT TO OPEN THE SPREADSHEET.
THANKS,
THAT IS IF THE SPREADSHEET IS NOT OPENED FOR 5 MIN AND I SHOULD GET AUTOMATIC EMAIL SAYING THAT I FORGOT TO UPDATE SPREADSHEET/FORGOT TO OPEN THE SPREADSHEET.
THANKS,