blackbeltrrf
Registered User.
- Local time
- Today, 11:14
- Joined
- May 10, 2007
- Messages
- 13
I have a problem with figuring out how to ignore a variable amount of blank spaces at the end of a field. My VBA code is as follows:
Private Sub cmdGetPrint_Click()
Dim x$
Dim stAppName As String
On Error GoTo Blank
Text177.Value = "" ' this is a textbox on my form used for building string
x$ = ItemMasterAqry_ITNBR (***Here is my problem***)
y$ = "series"
L$ = Left(x, 2)
t$ = L + y
Text177.Value = "\\prnusemcffilsrv1\faslook\exe\fl32.exe "+ " \\prnusemcfilsrv1\drawings\" + t$ + "\" + x$ + ".dwg"
stAppName = Text177.Value
Call Shell(stAppName, 1)
x$ = 1
End Sub
My problem is that with the different amounts of spaces at the end of the field I am referencing from our server my string build looks something like this:
\\prnusemcffilsrv1\faslook\exe\fl32.exe\\prnusemcfilsrv1\drawings\99series\991194 (variable amount of spaces) .dwg
I need to ignore the spaces at the end and move the .dwg to right after the part number so it can find and open the drawing
Any help would be GREATLY appreciated
Private Sub cmdGetPrint_Click()
Dim x$
Dim stAppName As String
On Error GoTo Blank
Text177.Value = "" ' this is a textbox on my form used for building string
x$ = ItemMasterAqry_ITNBR (***Here is my problem***)
y$ = "series"
L$ = Left(x, 2)
t$ = L + y
Text177.Value = "\\prnusemcffilsrv1\faslook\exe\fl32.exe "+ " \\prnusemcfilsrv1\drawings\" + t$ + "\" + x$ + ".dwg"
stAppName = Text177.Value
Call Shell(stAppName, 1)
x$ = 1
End Sub
My problem is that with the different amounts of spaces at the end of the field I am referencing from our server my string build looks something like this:
\\prnusemcffilsrv1\faslook\exe\fl32.exe\\prnusemcfilsrv1\drawings\99series\991194 (variable amount of spaces) .dwg
I need to ignore the spaces at the end and move the .dwg to right after the part number so it can find and open the drawing
Any help would be GREATLY appreciated