VBA code:
msgbox "Hi" & vbcrlf & "midi25"
codeLines = vbCrLf & vbCrLf & "Sub showAmessage()" & vbCrLf & _
" Msgbox ""This is a macro created by a macro""" & vbCrLf & _
"End Sub"
Converted code by VBA --- > js Converter:
msgbox("Hi" + vbcrlf + "midi25");
codeLines = vbCrLf + vbCrLf + "Sub showAmessage()" + vbCrLf + "Msgbox \"This is
a macro
created by a macro\"" + vbCrLf + "End Sub";
Actual converted code should be:
alert("Hi" + '\r\n' + "midi25")
codeLines = '\r\n\r\n' + "Sub showAmessage()" + '\r\n' + "alert(""This is a
macro created by a
macro""" + '\r\n' + "}" + '\r\n\r\n');
Observation:
1. "msgbox" is not being converted to "alert"
2. "vbcrlf " is not being converted to "\r\n"
Note:vbcrlf represents a carriage return line feed.
In java script these are represented as:
\n new line
\r carriage return
VBA constant --------- javascript conversion
*********************************************
vbCrLf '\r\n'
vbCr '\r'
vbLf '\n'
vbTab '\t'
Original issue reported on code.google.com by nikhilsi...@google.com on 16 May 2010 at 6:09
Original issue reported on code.google.com by
nikhilsi...@google.com
on 16 May 2010 at 6:09