Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

String variables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 16 Jul 2006 16:59 GMT
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
Trevor Shuttleworth - 16 Jul 2006 17:29 GMT
Try using "&" instead of "+" to concatenate the strings

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

Regards

Trevor

>I dim Warning(100) as string
>
[quoted text clipped - 17 lines]
>
> John
John - 16 Jul 2006 19:20 GMT
That fixed it. Thanks

John

> Try using "&" instead of "+" to concatenate the strings
>
[quoted text clipped - 25 lines]
>>
>>John
Trevor Shuttleworth - 16 Jul 2006 21:08 GMT
You're welcome.  Thanks for the feedback

> That fixed it. Thanks
>
[quoted text clipped - 29 lines]
>>>
>>>John

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.