Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open sheet once 1st time xl is open
Hey group,
I have my sheet in excel and only want it to open first time i open excel during the Morning. I have it in xl start but i want to enable the user to not have to hide the sheet and only be bothered by it once in the morning. Is there a way? Thanks in advance Jeff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open sheet once 1st time xl is open
Jeff,
Sure. But it makes more sense to not put the file in the XLStart folder. It also requires storing data somewhere - the registry is most convenient for me. Put this code into the workbook open event of a file in your XLStart folder - Personal.xls would be a good choice. Change the path and filename as appropriate. If GetSetting(appName:="OpenRecord", Section:="Startup", _ Key:="Date") < Format(Now(), "mm/dd/yyyy") Then Workbooks.Open Filename:="C:\Excel\OtherFolder\Open Once.xls" SaveSetting appName:="OpenRecord", Section:="Startup", _ Key:="Date", setting:=Format(Now(), "mm/dd/yyyy") End If HTH, Bernie MS Excel MVP "jeff" wrote in message ... Hey group, I have my sheet in excel and only want it to open first time i open excel during the Morning. I have it in xl start but i want to enable the user to not have to hide the sheet and only be bothered by it once in the morning. Is there a way? Thanks in advance Jeff |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open sheet once 1st time xl is open
Jeff,
On second thought, you could use this code in the open event of the file of interest, located in the XLStart folder: If GetSetting(appName:="OpenRecord", Section:="Startup", _ Key:="Date") = Format(Now(), "mm/dd/yyyy") Then ThisWorkbook.Close False Else SaveSetting appName:="OpenRecord", Section:="Startup", _ Key:="Date", setting:=Format(Now(), "mm/dd/yyyy") End If HTH, Bernie MS Excel MVP "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Jeff, Sure. But it makes more sense to not put the file in the XLStart folder. It also requires storing data somewhere - the registry is most convenient for me. Put this code into the workbook open event of a file in your XLStart folder - Personal.xls would be a good choice. Change the path and filename as appropriate. If GetSetting(appName:="OpenRecord", Section:="Startup", _ Key:="Date") < Format(Now(), "mm/dd/yyyy") Then Workbooks.Open Filename:="C:\Excel\OtherFolder\Open Once.xls" SaveSetting appName:="OpenRecord", Section:="Startup", _ Key:="Date", setting:=Format(Now(), "mm/dd/yyyy") End If HTH, Bernie MS Excel MVP "jeff" wrote in message ... Hey group, I have my sheet in excel and only want it to open first time i open excel during the Morning. I have it in xl start but i want to enable the user to not have to hide the sheet and only be bothered by it once in the morning. Is there a way? Thanks in advance Jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ON OPEN VBA Code input incorrectly now excel sheet wont open | New Users to Excel | |||
Why does a Multi-sheet/user file open on sheet two every time? | Excel Discussion (Misc queries) | |||
Time to open spread sheet | Excel Discussion (Misc queries) | |||
Can Excel open a new application every time you open a file? | Setting up and Configuration of Excel | |||
How do I stop Excel from closing the open file each time I open a. | Setting up and Configuration of Excel |