![]() |
displaying 'inches' (") in VB
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 |
displaying 'inches' (") in VB
If IsEmpty(Target) Then Target = "15" & chr(34) & " E551 - $300"
-- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. " 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 |
displaying 'inches' (") in VB
Maybe Target.Value = "15"" E551 - $300"
Two doublequotes after the 15. -- Jim wrote in message ups.com... | 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 | |
displaying 'inches' (") in VB
Hi Sean,
In my limited vba experience I have found that quotations have to be surrounded by double quotations. Try this: "15" & """" & " E551 - $300". " 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 |
displaying 'inches' (") in VB
In my limited vba experience, one has to put in double quotations around
quotations. Try this: "15" & """" & " E551 - $300" " 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 |
displaying 'inches' (") in VB
Or:
If IsEmpty(Target) Then Target = "15" & Chr(34) & " E551 - $300" " 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 |
All times are GMT +1. The time now is 08:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com