View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_50_] p45cal[_50_] is offline
external usenet poster
 
Posts: 107
Default Syntax or Something is KILLING Me

better:
change
ComboRow = Str(ComboBox1.ListIndex)
to
ComboRow = Trim(Str(ComboBox1.ListIndex))
--
p45cal


"Strong Eagle" wrote:

Folks, call me stupid, call me an occassional VB player but I cannot figure
out what is happening.

If I execute this statement:

Sheets("Estimator").Range("E14").NumberFormatLocal = CurrFormat

It works just fine. However, if I make things slightly more complex such as:

Const WorkColEntry = "E"
ComboRow = Str(ComboBox1.ListIndex) ' happens to be 14

Sheets("Estimator").Range(WorkColEntry + ComboRow).NumberFormatLocal =
CurrFormat

This statement blows up with an error:

Run-time error 104, Application-defined or object-defined error,

A very abstruse error definition I might add. In debug of the statement in
question, WorkColEntry is "E" and ComboRow is "14".

So what gives? It is 10:45 PM here in Singapore. To heck with this. Time
for sleep and a game of golf tomorrow.