Changing filename as variable

Joined
Dec 3, 2007
Messages
2
Reaction score
0
I'm not sure if my title is really clear on what I need help with. If not, I apologize.

I have a file that when a user submits it via a selection button, it gets saved with a new name. The issue is that I have some VBA code that needs to use the file name as part of a formula. Maybe this will explain it:

Range("F10").Select 'Project Budget
ActiveCell.FormulaR1C1 = "='[fname]Budget Estimate'!R288C7"
The file name "fname" is equal to "ThisWorkBook.Name" but the above formula gives me a #REF! error in the sheet in another open work book that I'm trying to pass the values to.

Any idea on what I'm doing wrong. Thanks for any help in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top