Thread: Trim Variable
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Trim Variable

Sub Replace()
Dim sVar As String
Dim WhatEver As String

sVar = Right(sVar, Len(sVar) - 12)
WhatEver = "whatevruwant"
sVar = WhatEver & sVar
End Sub

Mike F
"Les Stout" wrote in message
...
Hi all, i have a string variable and i need to replace the first 12
places (Left side), which are 8 numeric (Variable) and 4 spaces,
(constant). Is it possible to do this and if so could you please help
with some code.

thanks in advance.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***