comma as concatenation operator ?
Addendum: I know you sent a reply less than an hour after my post. Sometimes in the stress of a situation, I'm sure you've been
there, 45 minutes seems like 4 and 1/2 hours. I probably closed my newsreader after about 30 minutes because I had gotten it to work
(finally) and couldn't wait to see what was said, if anybody ended up coming in with a reply.
Thanks for your help. I hope I didn't seem to confusing.
Richard
--
RMC,CPA
"Jim Thomlinson" wrote in message ...
The comma is the argument separator for the function. It has nothing to do
with concatenate. The under score is the new line extender. The & is a
concatenate operator. You can also use + as a concatenate operator but it is
not recommended. What you have there is just really long function arguments...
--
HTH...
Jim Thomlinson
"R. Choate" wrote:
Here is a snippet of some extremely annoying code:
"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=" & strDir & Left(Sheets("Home").cboMonth, 3)
&
"" _
, _
"ls;Mode=Share Deny Write;Extended Properties=""HDR=NO;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet
OLEDB:Databas" _
, _
"e Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global Bu" _
, _
"lk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet" _
, _
" OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _
I hope your newsreader doesn't make this worse by wrapping, but my question is this: each line of this code (written by the macro
recorder) ends with a line continuation character and then the next line is simply a comma and another continuation character. The
only way this makes sense to me is if the comma is being used instead of an ampersand for a concatenation operator. I have never
heard of this before and couldn't find anything about it. Is this for real? The answer is important because I can't use the
auto-generated code as-is. Also, it looks stupid, cutting words in half and generating a nearly blank row before continuing. Why
would it do that?
Most importantly, please tell me if the comma is useable as a concatenation operator.
Thank you in advance !
--
RMC,CPA
|