VBA Code to Open an Excel File on a date criteria.

jevi

Active Member
Joined
Apr 13, 2010
Messages
339
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I did some research but it sound is not possible...so I wanted to be sure with the excel experts :).

I have a file in excel and I would like it can be opened automatically when I start the computer (first if this is possible) with a VBA, then it is better if this file can be opened only when it finds a word in a column (let's say column D) "Done" and not everyday...still even if it opens everyday is fine.

Thank you
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Have a look here to see how to load files at startup
 
Upvote 0
Hi Pluff..sorry where? I did search and XLSTART doesn't work for me as I am in banking sector so have a directery O. Then To put in C (where files can be opened automatically) it doesnìt work the file because it has a formula with hyperlink where I send the message in the Lotus Note Email ( so C is not connected with Lotus Note and my file doesn't work).

Thank you
 
Upvote 0


Hi Pluff, Yes I already tried it as I knew it
C:\Users\Name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

but the problem is that the file is being opened and correctly but I can't send a text message that I used a hyperlink formula.
=IF(C9=TODAY();HYPERLINK("mailto:"&D9&"?subject="&$C$4&"&body="&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($C$5;"$";B9);"@";$C$6);CHAR(10);"%0A");"send e-mail");"")


I need to open my file and click in the mail link so it can send an email but the C is not collected with Lotus Notes so it doesn't work. Then from O (banks data) it does work if I open from a usual folder and I can send the email. So that is i need a macro.
 
Upvote 0
I'm afraid I don't understand, if the file doesn't work from the C drive, why not move it to the O drive?
Also I've never used Lotus Notes, so no nothing about it.
 
Upvote 0
I move it to the O drive and it works perfect the hyperlink and I can send the email to Lotus Notes but I don't find the way to open automatically this file in O drive when I start windows....that is my problem.
 
Upvote 0
Without access to your network, I'm afraid I cannot help any further.
I've used that technique to auto open files from networks, without any problems.
 
Upvote 0
I will give a try tomorrow....but still It doesn't matter that mucht to send the email (would be perfect to send the email) but still I think is more important to open the file daily.

Still thank you...I let you know If I find the solution:).
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top