Office versions - coding differences - should I bother?
Office versions - coding differences - should I bother?
Author
Discussion

xiphias

Original Poster:

5,889 posts

257 months

Friday 27th October 2006
quotequote all
Long rambling post ahead...

Over the summer I wrote a program for a company I was on placement with. Because I was never given the internet (code examples), given office 97 and not really ever told what they wanted it was never finished. I offered to finish it in my spare time afterwards because I'm nice like that. So 1 month later and I finally get a chance to look at it. I now remember why I hate it. What a simple piece of code (1 line) in 97 writes the current date into a cell, crashes excel 2002 (my home pc) on startup. Perhaps I should mention everyone else was running on 2002 or 2003, so I have to make sure it worked at home as well - which means I couldn't test the sql out at the same time (what a farce).

End result is I'll have to recode it all for 2002. Are there any major differences between the office versions that require substantial recoding and has anybody else happened upon this before? I don't want to spend hours rewriting code that could be avoided in the first place. It would seem strange to me to alter between versions the syntax for even such a simple thing as this:

Code said:
Sheet4.Range("B2".FormulaR1C1 = "=(Now() - 7)"
Sheet4.Range("B3".FormulaR1C1 = "=Now()"
'Sheet4.Range("B2".FormulaR1C1 = Sheet4.Range("B2".Value \ 1
'Sheet4.Range("B3".FormulaR1C1 = Sheet4.Range("B3".Value \ 1


That's the code on startup which crashes my pc. It worked fine on '97. There are numerous other things that break it as well that previously worked - such as an sql query that crashes on importing 2000 rows and 32 columns (a lot yes - but not that much...)

Despite trying my hardest, I've never had the support needed to complete this from work. Especially as I'm doing a engineering materials degree, not a computing one! I think I've been taken advantage of and whilst I'm too nice to say no I'm really loathe to change anything. I had to explain what sql was, and try every single day to explain why you can't just change a database structure and expect the query you're using to work! I was led by incompetance.

I'm sorry for mumbling on here but I'm really tempted to just throw them the right SQL and tell them to stuff it. Thing is I hate letting people down and I'm just sat here stressed out of my mind and worried about whether I'm doing the right thing. Any ideas?