Hey all,
Is it possible to have some code that opens a file dependant on the year. So, for example, if the current year is 2011, I want it to open the file called "Accounts Owed 2011". If it is 2012 then "Accounts Owed 2012" etc
any ideas?
Jamer
Hey all,
Is it possible to have some code that opens a file dependant on the year. So, for example, if the current year is 2011, I want it to open the file called "Accounts Owed 2011". If it is 2012 then "Accounts Owed 2012" etc
any ideas?
Jamer
Last edited by jamer02; 07-21-2011 at 06:54 AM.
Something like this:
![]()
Workbooks.Open "C:\Accounts Owed " & Format(Date, "yyyy") & ".xls"
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
Absolute legend, works a treat.
Cheers Dom
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks