Link to home
Start Free TrialLog in
Avatar of Stephen Byrom
Stephen ByromFlag for Ireland

asked on

Unknown reason for Excel error

Hi,
I have a vba routine that runs fine, and after its run, the spreadsheet operates just fine without any problems.
I then save and close the workbook. Then when I open it, I get the following message.User generated image I have no idea what it means, but if i close the error and then save and close the file, it reopens without the error.
Has anyone seen this before?
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

is this linked content?
Avatar of Stephen Byrom

ASKER

Hi,
If you mean by linked content that the data is in another workbook, then yes.
The data is not actually linked across the workbooks, but some data is manipulated in one workbook before it copies a section of it to the active workbook.
Hope that helps
Does your document have tables?

Was it created in a previous version than the one you are using?

Did you lose any data?

Was it originally based on an old template?

Do you have any named ranges that perhaps don't point to valid ranges anymore?
Thanks for the speedy response,
Tables no
Same version
Did not lose any data
not from a template.

:)
Its rather a large workbook,
I can trim it down to bare necessity and attach it if that would help, but it will take a while, as I'm busy at work doing other things at the moment
If you have named ranges, I suspect they are the culprit ... perhaps you copied and pasted from another workbook (or worksheet), or code did, and inadvertently introduced some named ranges that don't resolve to anything.

Well, they would be removed now ~

When you save, close, and open again, is the error gone?
Yes,
When I close the file it wants me to save it, so i just save it as is.
I can then open the same file without the error
Excel doesn't like the same range name being used more than once, so if code is copying a sheet, or range on a sheet, and pasting it to another one, my first guess would be that is why you are getting the error
ASKER CERTIFIED SOLUTION
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your time on this.
There were sheets in both workbooks with the same name, and I had already done the paste values thing.
Thanks again
you're welcome, Stephen ~ happy to help