PC Review


Reply
Thread Tools Rate Thread

displaying 'inches' (") in VB

 
 
sbweld@shaw.ca
Guest
Posts: n/a
 
      15th Mar 2007
Hello,

This is a snip from the code I am running on the sheet:

If IsEmpty(Target) Then Target = "15" E551 - $300"

I want it to return '15" E551 - $300'

The problem I am having is the ability to use the inches symbol ("). I
get an error when I use this code because visual basic thinks that the
" is the end of the value.

Anyone have any idea how to get around this?

Thanks

Sean

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeSBCcm93bg==?=
Guest
Posts: n/a
 
      15th Mar 2007
If IsEmpty(Target) Then Target = "15" & chr(34) & " E551 - $300"

--
HTH,
Gary Brown
(E-Mail Removed)
If this post was helpful to you, please select ''YES'' at the bottom of the
post.


"(E-Mail Removed)" wrote:

> Hello,
>
> This is a snip from the code I am running on the sheet:
>
> If IsEmpty(Target) Then Target = "15" E551 - $300"
>
> I want it to return '15" E551 - $300'
>
> The problem I am having is the ability to use the inches symbol ("). I
> get an error when I use this code because visual basic thinks that the
> " is the end of the value.
>
> Anyone have any idea how to get around this?
>
> Thanks
>
> Sean
>
>

 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      15th Mar 2007
Maybe Target.Value = "15"" E551 - $300"

Two doublequotes after the 15.

--
Jim
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| Hello,
|
| This is a snip from the code I am running on the sheet:
|
| If IsEmpty(Target) Then Target = "15" E551 - $300"
|
| I want it to return '15" E551 - $300'
|
| The problem I am having is the ability to use the inches symbol ("). I
| get an error when I use this code because visual basic thinks that the
| " is the end of the value.
|
| Anyone have any idea how to get around this?
|
| Thanks
|
| Sean
|


 
Reply With Quote
 
=?Utf-8?B?QmlnUGln?=
Guest
Posts: n/a
 
      15th Mar 2007
Hi Sean,

In my limited vba experience I have found that quotations have to be
surrounded by double quotations. Try this: "15" & """" & " E551 - $300".

"(E-Mail Removed)" wrote:

> Hello,
>
> This is a snip from the code I am running on the sheet:
>
> If IsEmpty(Target) Then Target = "15" E551 - $300"
>
> I want it to return '15" E551 - $300'
>
> The problem I am having is the ability to use the inches symbol ("). I
> get an error when I use this code because visual basic thinks that the
> " is the end of the value.
>
> Anyone have any idea how to get around this?
>
> Thanks
>
> Sean
>
>

 
Reply With Quote
 
=?Utf-8?B?QmlnUGln?=
Guest
Posts: n/a
 
      15th Mar 2007
In my limited vba experience, one has to put in double quotations around
quotations. Try this: "15" & """" & " E551 - $300"

"(E-Mail Removed)" wrote:

> Hello,
>
> This is a snip from the code I am running on the sheet:
>
> If IsEmpty(Target) Then Target = "15" E551 - $300"
>
> I want it to return '15" E551 - $300'
>
> The problem I am having is the ability to use the inches symbol ("). I
> get an error when I use this code because visual basic thinks that the
> " is the end of the value.
>
> Anyone have any idea how to get around this?
>
> Thanks
>
> Sean
>
>

 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      15th Mar 2007
Or:

If IsEmpty(Target) Then Target = "15" & Chr(34) & " E551 - $300"

"(E-Mail Removed)" wrote:

> Hello,
>
> This is a snip from the code I am running on the sheet:
>
> If IsEmpty(Target) Then Target = "15" E551 - $300"
>
> I want it to return '15" E551 - $300'
>
> The problem I am having is the ability to use the inches symbol ("). I
> get an error when I use this code because visual basic thinks that the
> " is the end of the value.
>
> Anyone have any idea how to get around this?
>
> Thanks
>
> Sean
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel displaying inches not cm Adam Microsoft Excel Misc 0 17th May 2010 04:06 AM
convert column with inches to 2 columns "feet" and "inches" fsudiane Microsoft Excel Misc 2 12th Mar 2010 12:30 AM
unit measurement set for inches, but shows "ch" not inches =?Utf-8?B?S2FyYW4=?= Microsoft Word Document Management 8 14th Dec 2005 11:41 PM
Re: Displaying column width in inches Gord Dibben Microsoft Excel Misc 0 8th Jun 2004 10:43 PM
Re: Displaying column width in inches Lukin Microsoft Excel Misc 0 8th Jun 2004 09:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:26 AM.