Setting Form to load once a day

bensonsearch

Well-known Member
Joined
May 26, 2011
Messages
844
Hi All,

im kinda newish to VB/VBA (used to be good but many years ago). anyways my delema is as follows;

I have a program made in vba for the office for different users on different computers to use. There is 1 form that I want to only appear the first time they run the program each day (the program can be closed and opened again without it showing).

I know i can call it when the main part starts (which is in auto run) but i only want it once a day. Is this even possible??

I can not find anything on google at all.

thanx in advance
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Store the date in a cell somewhere - in a hidden sheet, perhaps.

When the workbook is opened, check whether the cell contains the current date: if doesn't, load the form and store the current date; if it does contain the current date, that means the form has already been loaded that day so don't load it again.
 
Upvote 0
OMG that is so genius and simple. I could also do the same with a txt file. thank you so much. from memory the vba function is just "Date" without the marks right?
 
Upvote 0
The quickest way to test things like that is to create a new workbook, hit Alt-F11 to go to the VBA editor, Ctrl-G to open the Imediate window, and try it there.

Use ? to print, so type ?date and press Enter.
 
Upvote 0

Forum statistics

Threads
1,215,637
Messages
6,125,964
Members
449,276
Latest member
surendra75

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