range.value changes

  • Thread starter Thread starter Tina
  • Start date Start date
T

Tina

I have a range("e7").value in a function and it gets 1108, but then when it
goes to another function to get the same range - its does not, it got 35449
instead. Why is that? This used to work until I changed it from 1008 to
1108. This is set to text with the '1108 as such in the file.
 
It would be helpful is you post the code that is causing the problem.
The value 35449 looks suspiciously like a serial date.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Tina,

This isn't clear. You refer to Range("E7") being used in a function.
Functions must be in a general module so if the range is qualified

sheets("Sheet1").Range("E7")

it will return the E7 value from the activesheet. Can you post your code.

Mike
 
I think you have a typo...
sheets("Sheet1").Range("E7")

it will return the E7 value from the activesheet.

That line will return the value from Sheet1 and not the active sheet. As a
guess you are on the correct track though. My guess is that Range("E7") is an
unqualified range in tina's code so it pulls from the active sheet when what
Tina probably wants is for the value to come frm a specific sheet...
 
That's what I meant but clearly didn't express it properly, my guess remains
that the OP is using unqualified range references in a function and picking
up unexpected values:)
 

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