ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I include a " in my string? (https://www.excelbanter.com/excel-programming/336203-how-can-i-include-my-string.html)

Ai_Jun_Zhang

How can I include a " in my string?
 

Hi!

For example, in my vba code, I need to assign a string to a variable.
For example, I have a string as abc"def. How can I include this " in
my string. The one shown below would not work. Please advise. Thanks,
Aijun.

sMyStr = "abc"def"


--
Ai_Jun_Zhang
------------------------------------------------------------------------
Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...o&userid=25474
View this thread: http://www.excelforum.com/showthread...hreadid=392369


Ai_Jun_Zhang[_2_]

How can I include a " in my string?
 

I figured it out.

sMyStr = abc""def will do it.


--
Ai_Jun_Zhang
------------------------------------------------------------------------
Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...o&userid=25474
View this thread: http://www.excelforum.com/showthread...hreadid=392369



All times are GMT +1. The time now is 06:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com