|
-
Feb 24th, 2005, 01:38 PM
#1
Thread Starter
Fanatic Member
tip for locking a textbox in office apps
really didn't see a forum to put vba tips... moderator, move wherever you feel is appropriate..
the locked property of textboxes i never really like or the enabled = false.
what i've done is to drag a label and completely cover the textbox [label that is included with a textbox (ms-access), too] and for the text of the label i embed a char 255 - [sort of like a space, but not].
You can embed it by holding down the Alt key and on the number pad typing 255.
A user will not be able edit or type into the box and it looks completely normal.
-
Feb 24th, 2005, 01:55 PM
#2
Re: tip for locking a textbox in office apps
What is the purpose of chr 255? Wether I embedd it or not it still does the same.
Also, the cursor still responds to the keypresses, but no chars are displayed, so I guess thats ok.
The main issue with this is that it is only for appearance because if you place a command button on the form
and msgbox the textboxes contents it still contains the chars you typed. I tried this with both the textbox
having char 255 and the label too?
Am I missing something?
Btw, are you meaning the shapes textbox and label or the userforms?
Last edited by RobDog888; Feb 24th, 2005 at 01:59 PM.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|