does anyone know how many spaces a vbtab can take up? is there a way to find out?
does anyone know how many spaces a vbtab can take up? is there a way to find out?
I'm not aware of any function that returns that...
If it's that important vbTab can easily be substituted with fixed number of spaces using Space(number_of_spaces) function when you build string yourself.
If string comes from elsewhere you may use Replace(oldstring, vbTab, Space(number_of_spaces)) function to replace all vbTab characters with fixed number of spaces.
btw, there is no need to post twice the same question.![]()
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
To piggyback on RhinoBull's comments. Tabs are not necessarily the same from control to control or on the printer. A tab in a listbox may not be the same tab in a textbox and may not be same as a tab in a picturebox, etc, etc. Tabs are almost always related to font type/size; though some may be hard-set pixel offsets.
In addition, many controls allow users to explicitly set tabs to custom offsets so a tab in the same types of controls may not match. I wouldn't make the blanket assumption that a tab is always a fixed amount of "spaces" every time a tab character is encountered; tabs can be fixed or dynamically spaced
Insomnia is just a byproduct of, "It can't be done"
Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum. Read the HitchHiker's Guide to Getting Help on the Forums.
Here is the list of TAGs you can use to format your posts
{Alpha Image Control} {Memory Leak FAQ} {GDI+ Classes/Samples} {Unicode Open/Save Dialog} {Icon Organizer/Extractor}
{VBA Control Arrays} {XP/Vista Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}