Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Hight and Width of textbox with vba

Status
Not open for further replies.

at51178

Technical User
Mar 25, 2002
587
US
I have a form with a button and a textbox I would like to click on the button and have the textbox's height and width adjusted but when I click on the button my textbox disappears.This is the code that I am using.


Me.textbox.width = "1"
me.textbox.height= "1"

I know why it is disappearing because it doesn't understand 1 it should be 1" but how do I write that in vba
 
The default unit of measure in VBA is twips (you can change it with code). One twip is 1/1440 of an inch. So just change the value you're assigning to 1440 and that should give you 1".

Ken S.
 
Thanks a lot it worked
Learned something new everyday
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top