Forum Discussion

Delaney1382bill's avatar
Delaney1382bill
Copper Contributor
May 24, 2022

Excel Remove Message and auto fill the year

I have two questions I need to get answered:

1. When I open my Excel Database I get the following Message: "This workbook contains links to one or more external sources that could be unsafe." I get this because I have cells that I copied from one worksheet to another. 

WHAT I WOULD LIKE TO KNOW: Is there a way perhaps with VBA code that I can get this message to not show up every time I open the database. If the answer is yes You need to know I am not that good at writing code so I will need that sent to me in detail. If there is no way to get that message to disappear that will be ok I can live with that.

2. I need to auto fill when ever the database is open the following:

The current year  (for example: 2022)

The next year  (for example: 2023)

and one cell that shows the current month and year.     (for example: May, 2022)

I have tried looking on line and none of the code or formulas that I have looked at work.

Any help you can give will be greatly appreciated.

Thanks

Bill

18 Replies

  • Delaney1382bill 

    2) Select the cell in which you want the current year.

    Enter the formula =YEAR(TODAY())

    Select the cell in which you want next year.

    Enter the formula =YEAR(TODAY())+1

    Select the cell in which you want the current month and year.

    Enter the formula =TEXT(TODAY(),"mmmm, yyyy")

    • Delaney1382bill's avatar
      Delaney1382bill
      Copper Contributor
      That worked perfect thank you so much for your help.

      I take it there is no way to get rid of that message that keeps popping up since there is nothing addressing that issue. I can live with that though

Resources