Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob,
That is giving the same error, i've checked and I think that code is identical to the first code you posted. Thanks again, Gary. Bob Phillips wrote: See if this helps With ActiveCell sMake = Cells(.Row, make).Value sModel = Cells(.Row, model).Value sExpiry = Cells(.Row, expirary).Value sCommission = Cells(.Row, commision).Value textstring = sMake & Space(20 - Len(sMake)) & " - " & _ sModel & Space(30 - Len(sModel)) & " - " & _ sExpiry & Space(30 - Len(sExpiry)) & " - " & _ "£" & sCommission & Space(30 - Len(sCommission)) & _ Chr(10) End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) wrote in message ups.com... Thank you Bob that looks ideal, but there is a slight problem at the moment - when I run the code i get an error that mentions an 'invalid procedure call or argument'. When I click debug the following code is highlighted: - textstring = sMake & Space(20 - Len(sMake)) & " - " & _ sModel & Space(30 - Len(sModel)) & " - " & _ sExpiry & Space(30 - Len(sExpiry)) & " - " & _ "£" & sCommission & Space(30 - Len(sCommission)) & Chr(10) Thanks, Gary |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation, Need text any length no spaces | Excel Discussion (Misc queries) | |||
number as string and adding spaces to it | Excel Programming | |||
Counting string length | Excel Programming | |||
counting spaces in a string | Excel Programming | |||
counting spaces in a string | Excel Programming |