Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #110771
| From | GS <gs@v.invalid> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Problem encountered with Debug.Print message being passed to subroutine |
| Date | 2018-11-07 16:54 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <prvmug$mru$1@dont-email.me> (permalink) |
| References | (2 earlier) <2f1dbb63-af9f-4a33-9be7-7b67ac7dcda0@googlegroups.com> <prv928$tra$1@dont-email.me> <prv96h$un5$1@dont-email.me> <821a0ff4-0f70-4155-9b7f-437246d41457@googlegroups.com> <prvkk5$86r$1@dont-email.me> |
Note that using vbTab applies the tab spacing set on the VBE Options>General
tab, whereas using the Space() function allows you to specify the spacing
between string sets.
I have the following function that accepts an Integer arg for the spacing I
want to use between sections when building strings. I also know that "Tab" is a
keyword and so have no idea why I didn't pick up on that; - sory, my bad!
So...
Public Function SetTab$(iLen%)
' Returns a set length string of spaces
' Args: iLen% The number of spaces
SetTab = Space(iLen)
End Function 'SetTab()
..and I use it like so...
Sub test_SetTab()
Dim s1$
s1 = "A" & vbTab & "B" & vbTab & "C"
Debug.Print s1
s1 = "Part1:" & SetTab(10) & "Part2;" & SetTab(5) & "Part3!"
Debug.Print s1
End Sub
..which returns the following:
A B C
Part1: Part2; Part3!
--
Garry
Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-06 13:43 -0800
Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-06 19:59 -0500
Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-06 22:53 -0800
Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 12:57 -0500
Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 12:59 -0500
Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-07 10:40 -0800
Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 16:14 -0500
Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 16:54 -0500
Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-11 20:23 -0800
Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-11 21:09 -0800
Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-12 18:10 -0500
Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-13 22:36 -0800
Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-14 20:31 -0500
csiph-web