Group:  Microsoft Excel ยป microsoft.public.excel.newusers
Thread: String variables

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

String variables
John <JOhn6328[ at ]mchsi.com> 16.07.2006 15:59:00
I dim Warning(100) as string

Then I do the following:

Warning(1) = Cells(1, 3) + " " + Cells(3, 3) + " " + "Assessments" + "=
" + Cells(2, 13) + "," + Cells(2, 16)


Cells (1,3) is a string
Cells(3,3) is a social security number
"Assessments" I mean the word Assessments
Cells(2,13) and Cells(2,16) are numbers


I want Warning(1) to = "Joe Blow 123-45-6789 Assessments 4,5"

I get a type mismatch.

This is old code from Power Basic.

Help and thanks

John

Re: String variables
"Trevor Shuttleworth" <Trevor[ at ]Shucks.demon.co.uk> 16.07.2006 16:29:43
Try using "&" instead of "+" to concatenate the strings

Suspect it's trying to add up and finding data other than numbers

Regards

Trevor


"John" <JOhn6328[ at ]mchsi.com> wrote in message
news:%23%23dtBDPqGHA.5108[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
>I dim Warning(100) as string
>
> Then I do the following:
>
> Warning(1) = Cells(1, 3) + " " + Cells(3, 3) + " " + "Assessments" + "= "
> + Cells(2, 13) + "," + Cells(2, 16)
>
>
> Cells (1,3) is a string
> Cells(3,3) is a social security number
> "Assessments" I mean the word Assessments
> Cells(2,13) and Cells(2,16) are numbers
>
>
> I want Warning(1) to = "Joe Blow 123-45-6789 Assessments 4,5"
>
> I get a type mismatch.
>
> This is old code from Power Basic.
>
> Help and thanks
>
> John
>


Re: String variables
John <JOhn6328[ at ]mchsi.com> 16.07.2006 18:20:46
That fixed it. Thanks

John

Trevor Shuttleworth wrote:
[Quoted Text]
> Try using "&" instead of "+" to concatenate the strings
>
> Suspect it's trying to add up and finding data other than numbers
>
> Regards
>
> Trevor
>
>
> "John" <JOhn6328[ at ]mchsi.com> wrote in message
> news:%23%23dtBDPqGHA.5108[ at ]TK2MSFTNGP05.phx.gbl...
>
>>I dim Warning(100) as string
>>
>>Then I do the following:
>>
>>Warning(1) = Cells(1, 3) + " " + Cells(3, 3) + " " + "Assessments" + "= "
>>+ Cells(2, 13) + "," + Cells(2, 16)
>>
>>
>>Cells (1,3) is a string
>>Cells(3,3) is a social security number
>>"Assessments" I mean the word Assessments
>>Cells(2,13) and Cells(2,16) are numbers
>>
>>
>>I want Warning(1) to = "Joe Blow 123-45-6789 Assessments 4,5"
>>
>>I get a type mismatch.
>>
>>This is old code from Power Basic.
>>
>>Help and thanks
>>
>>John
>>
>
>
>
Re: String variables
"Trevor Shuttleworth" <Trevor[ at ]Shucks.demon.co.uk> 16.07.2006 20:08:48
You're welcome. Thanks for the feedback


"John" <JOhn6328[ at ]mchsi.com> wrote in message
news:eepCPSQqGHA.612[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> That fixed it. Thanks
>
> John
>
> Trevor Shuttleworth wrote:
>> Try using "&" instead of "+" to concatenate the strings
>>
>> Suspect it's trying to add up and finding data other than numbers
>>
>> Regards
>>
>> Trevor
>>
>>
>> "John" <JOhn6328[ at ]mchsi.com> wrote in message
>> news:%23%23dtBDPqGHA.5108[ at ]TK2MSFTNGP05.phx.gbl...
>>
>>>I dim Warning(100) as string
>>>
>>>Then I do the following:
>>>
>>>Warning(1) = Cells(1, 3) + " " + Cells(3, 3) + " " + "Assessments" + "= "
>>>+ Cells(2, 13) + "," + Cells(2, 16)
>>>
>>>
>>>Cells (1,3) is a string
>>>Cells(3,3) is a social security number
>>>"Assessments" I mean the word Assessments
>>>Cells(2,13) and Cells(2,16) are numbers
>>>
>>>
>>>I want Warning(1) to = "Joe Blow 123-45-6789 Assessments 4,5"
>>>
>>>I get a type mismatch.
>>>
>>>This is old code from Power Basic.
>>>
>>>Help and thanks
>>>
>>>John
>>>
>>
>>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net