Worksheet references

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings and thanks for taking the time to read through my question

I have a workbook that I am using as a template. Within this workbook, there are 4 sheets that summarize the data on other worksheets that will be added via an Access VBA process. My problem is this: when the data sheets are not present, (such as when the template does not contain the data sheets yet), the references to these sheets are replaced with the "#ref" error. How can I keep the references to the sheets that do not exist yet? The goal here is to have the summary sheets summarize the data once it is present.
 
Perhaps you can make a dummy sheet. Then, in your code, find/replace the
dummy sheet name with the real sheet names once the data is there. Make the
dummy sheet name real weird, like "dummy", so that when you find/replace
"dummy" with "myrealsheetnames", it doesn't replace some actual text
somehow.

Is there some reason you're not just querying the database instead? (just
making sure you know it can be done).

<-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*->
Hope this helps!
Anne Troy (better known as Dreamboat)
Author: Dreamboat on Word
Email: Dreamboat*at*Piersontech.com
Web: www.TheOfficeExperts.com
<-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*->
Notyard said:
Greetings and thanks for taking the time to read through my question!

I have a workbook that I am using as a template. Within this workbook,
there are 4 sheets that summarize the data on other worksheets that will be
added via an Access VBA process. My problem is this: when the data sheets
are not present, (such as when the template does not contain the data sheets
yet), the references to these sheets are replaced with the "#ref" error. How
can I keep the references to the sheets that do not exist yet? The goal here
is to have the summary sheets summarize the data once it is present.
 
The reason that I am exiting Access with the data and entering Excel is to let the end-users manipulate some fixed values without having to give them access to the db. The dummy sheet would work, but that would involve the user having to find and replace. This is not acceptable in this instance. The idea here is to give the end-user the data, a summary, and the ability to model a few scenarios. I can NOT count on the user's ability to use the file. It needs to work as soon as they open it, with ZERO interaction on their part. I am also trying to not have to open the file myself after the VBA process is run to make the changes to references

I think I may have found a fix on my own, using an INDIRECT statement that points to a cell that contains the valid "sheet name". This should remain static even if the actual sheet is not present at the time

Thanks for your input :

----- Anne Troy wrote: ----

Perhaps you can make a dummy sheet. Then, in your code, find/replace th
dummy sheet name with the real sheet names once the data is there. Make th
dummy sheet name real weird, like "dummy", so that when you find/replac
"dummy" with "myrealsheetnames", it doesn't replace some actual tex
somehow

Is there some reason you're not just querying the database instead? (jus
making sure you know it can be done)

<-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*-
Hope this helps
Anne Troy (better known as Dreamboat
Author: Dreamboat on Wor
Email: Dreamboat*at*Piersontech.co
Web: www.TheOfficeExperts.co
<-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*-
Notyard said:
Greetings and thanks for taking the time to read through my question
there are 4 sheets that summarize the data on other worksheets that will b
added via an Access VBA process. My problem is this: when the data sheet
are not present, (such as when the template does not contain the data sheet
yet), the references to these sheets are replaced with the "#ref" error. Ho
can I keep the references to the sheets that do not exist yet? The goal her
is to have the summary sheets summarize the data once it is present
 
Back
Top