C
Charlie
It has been a long time since I asked this question to this problem. The
answer was simple but I forgot what it was.
I have a template spreadsheet I created over 2 years ago for my office
people. It contains 5 tabs, 3 are databases, the other 2 are master lists.
The master list tabs are copied as daily data entry sheets for each work day
of the week. At the end of the month there are generally around 45 tabs
total.
The databases and master lists are update daily as needed so at the end of
the month the workbook is copied and all daily data entry tabs for the
previous month are deleted and the cycle starts over.
Once I instructed my office people on how to make a copy of the workbook for
the next month I kinda got away from monitoring its use. Now an old problem
resurfaced and I forgot why. The master tabs have lookup formulas to the 3
databases. For the current month the formula on the master tabs and each
copy would go something like this.
=vlookup(b2,database!$A$4:$F$250,5,False) Lets call this workbook Oct.xls
Once the workbook is copied for the month of Novemember, the formulas
references now refer to the Oct.xls instead of the newly created Nov.xls. I
forgot how to copy the workbook. Should it be copy - paste from the
explorer and then rename it or save as from inside the workbook to have the
formulas rename themselves to the new workbook name?
And don't I need this code placed in ThisWorkbook to maintain the reference?
Public Sub global_variable()
Public mybook
End Sub
Thanks,
Charlie
answer was simple but I forgot what it was.
I have a template spreadsheet I created over 2 years ago for my office
people. It contains 5 tabs, 3 are databases, the other 2 are master lists.
The master list tabs are copied as daily data entry sheets for each work day
of the week. At the end of the month there are generally around 45 tabs
total.
The databases and master lists are update daily as needed so at the end of
the month the workbook is copied and all daily data entry tabs for the
previous month are deleted and the cycle starts over.
Once I instructed my office people on how to make a copy of the workbook for
the next month I kinda got away from monitoring its use. Now an old problem
resurfaced and I forgot why. The master tabs have lookup formulas to the 3
databases. For the current month the formula on the master tabs and each
copy would go something like this.
=vlookup(b2,database!$A$4:$F$250,5,False) Lets call this workbook Oct.xls
Once the workbook is copied for the month of Novemember, the formulas
references now refer to the Oct.xls instead of the newly created Nov.xls. I
forgot how to copy the workbook. Should it be copy - paste from the
explorer and then rename it or save as from inside the workbook to have the
formulas rename themselves to the new workbook name?
And don't I need this code placed in ThisWorkbook to maintain the reference?
Public Sub global_variable()
Public mybook
End Sub
Thanks,
Charlie