PDA

View Full Version : Writing the character " into Cell



frubeng
02-25-2010, 06:13 AM
Hi all,

I woul liked to have my cell contain the following
=myfun(A3 , "Date")

where myfun uses "Date" as a string. The problem is that writing this in my macro, treats the " char as the end of my string...
How do i solve this?

Thanks!! (i tried the \ like in java but it doesn seem to work. the most annoying thing about looking for help on this is that " isnt recognise as a character in google!!)

Bob Phillips
02-25-2010, 06:22 AM
Show us what myFun does.

frubeng
02-25-2010, 06:46 AM
Show us what myFun does.

It just takes the second input as string. My problem is that I am trying to say:
Workbooks("book1.xlsm").Worksheets("Sheet1").Cells(3, 1) = "=myfun(A3 , "Date")"

but of course, this treats it as:
"=myfun(A3 , " Date ")"
Is there a character i can put befroe the " to treat it as part of the string?

Bob Phillips
02-25-2010, 10:39 AM
Workbooks("book1.xlsm").Worksheets("Sheet1").Cells(3, 1) = "=myfun(A3 , ""Date"")"

frubeng
02-25-2010, 10:40 AM
Great thanks!