Hello,
I have been noticing some strange behavior with some text boxes which are embedded in a worksheet.
Say for instance I saved/closed the workbook with the value of "6" in the text box. When I re-open the workbook and change the value to something different, say "4", it will still display "6" whenever the text box is inactive.
If you click in the text box and make it active, it will then accurately display the new value of "4". We use VBA to read the value of these text boxes using the following code:
The VBA code retrieves the correct value of "4", but it is very misleading to the user that the displayed value is "6" when the text box is inactive.txtValue = Sheets(1).checkbox1.Value
Anyone else ever encounter this?
Thanks!
Kyle
PS. It does this in both 2003 & 2007.
Last edited by royUK; 10-28-2009 at 03:37 PM.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Added this time only
Also, please say which type of textboxes you are using, maybe attach an example workbook
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Hello khott13,
Welcome to the Forum!
What type of text boxes are they: Forms, Control Toolbox, or something else?
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Sorry about that, I'll be sure to mark my code in the future.
We have noticed that this occurs for both Form and ActiveX control text boxes. It also only occurs to text boxes which have been read using VBA.
Unforunately I can't send a version of the workbook for privacy concerns.
-Kyle
Change the data, just leave the textboxes intact.
beter still why bother with TextBoxes?
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks