![]() |
|
|
|
#1
|
|||
|
|||
|
Hi if i have a userform that add a appointment to the calender and in the form there are some field with fixed size of 35 char. that i have set. I would like to have this variable to allways has 35 char. even if the user only enter 4 char. and fill the rest of the variable with spaces, how do i do that? |
|
#2
|
||||
|
||||
|
maybe
Code:
Dim strValue As String
strValue = "abc" 'the value from the userform
If Len(strValue) > 35 Then
strValue = Left(strValue, 35)
Else
Do Until Len(strValue) = 35
strValue = strValue & Chr(32)
'OR
'strValue = Chr(32) & strValue
Loop
End If
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#3
|
|||
|
|||
|
Thanks, i'll will try this :-)
Do you know how to write an appointment to a shared calender? |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBA Code in a UserForm module to delete a Command Button which opens the userform | Simoninparis | Word VBA | 2 | 09-21-2014 03:50 AM |
| How to copy userform text and formfield contents to outlook? | odin | Word VBA | 7 | 09-09-2014 11:56 AM |
Is it possible to take an input from a UserForm in one document to a UserForm in a do
|
BoringDavid | Word VBA | 5 | 05-09-2014 09:08 AM |
| How to get Outlook 2007 userform into template? | Royzer | Outlook | 0 | 04-13-2012 10:41 AM |
| Outlook userform validation help | aiwnjoo | Outlook | 0 | 12-08-2010 12:57 AM |