What is the max length of a single piece of code?

E

efandango

I am trying to make this rather long piece of code work, but when I paste it,
the VBA window makes it Red 'error' Text. Is their a maxiumum length that VBA
will allow?


stAppName = "C:\Program Files\Internet Explorer\iexplore.exe
http://maps.google.co.uk/maps?f=q&hl=en&q=" & "from: " & Me.RunWaypoint_1 +
", London" & (" to: " + Me.RunWaypoint_2 + ", London") & (" to: " +
Me.RunWaypoint_3 + ", London") & (" to: " + Me.RunWaypoint_4 + ", London") &
(" to: " + Me.RunWaypoint_5 + ", London") & (" to: " + Me.RunWaypoint_6 + ",
London") & (" to: " + Me.RunWaypoint_7 + ", London") & (" to: " +
Me.RunWaypoint_8 + ", London") & (" to: " + Me.RunWaypoint_9 + ", London") &
(" to: " + Me.RunWaypoint_10 + ", London") & (" to: " + Me.RunWaypoint_11 +
", London") & (" to: " + Me.RunWaypoint_12 + ", London") & (" to: " +
Me.RunWaypoint_13 + ", London") & (" to: " + Me.RunWaypoint_14 + ", London")
& (" to: " + Me.RunWaypoint_15 + ", London") & (" to: " + Me.RunWaypoint_16 +
", London") & (" to: " + Me.RunWaypoint_17 + ", London") & (" to: " +
Me.RunWaypoint_18 + ", London") & (" to: " + Me.RunWaypoint_19 + ", London")
& (" to: " + Me.RunWaypoint_20 + ", London") & (" to: " + Me.RunWaypoint_
21 + ", London") & (" to: " + Me.RunWaypoint_22 + ", London") & (" to: " +
Me.RunWaypoint_23 + ", London") & (" to: " + Me.RunWaypoint_24 + ", London")
& (" to: " + Me.RunWaypoint_25 + ", London") & (" to: " + Me.RunWaypoint_26 +
", London") & (" to: " + Me.RunWaypoint_27 + ", London") & (" to: " +
Me.RunWaypoint_28 + ", London") & (" to: " + Me.RunWaypoint_29 + ", London")
& (" to: " + Me.RunWaypoint_30 + ", London") & (" to: " + Me.RunWaypoint_31 +
", London") & (" to: " + Me.RunWaypoint_32 + ", London")
 
T

Todos Menos [MSFT]

I've got a procedure that is like 50,000 characters; and including
spaces, it is 130,000 characters.

I had to prune it in order to make something more logical
 
D

Douglas J. Steele

Try splitting it up like:

stAppName = "C:\Program Files\Internet Explorer\iexplore.exe "
stAppName = stAppName & "http://maps.google.co.uk/maps?f=q&hl=en&q="
stAppName = stAppName & "from: " & Me.RunWaypoint_1 + ", London"
stAppName = stAppName & (" to: " + Me.RunWaypoint_2 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_3 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_4 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_5 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_6 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_7 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_8 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_9 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_10 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_11 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_12 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_13 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_14 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_15 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_16 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_17 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_18 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_19 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_20 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_21 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_22 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_23 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_24 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_25 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_26 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_27 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_28 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_29 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_30 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_31 + ", London")
stAppName = stAppName & (" to: " + Me.RunWaypoint_32 + ", London")
 
T

Tony Toews [MVP]

I've got a procedure that is like 50,000 characters; and including
spaces, it is 130,000 characters.

I had to prune it in order to make something more logical

Note that this person is really A a r o n K e m p f and that he is not an employee
of Microsoft.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
T

Todos Menos [MSFT]

Tony

stfu kid

You're neither Most, Valuable-- or a Professional

I mean-- you're a cry baby Access developer

go and play in some other newsgroup; since ADP is the rightful heir to
the Access Name-- because ADP is the most popular format in 2002 and
2003-- you can stick a fork in it, mofo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top