Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 problems which I think are related but have no proof. Let me
explain. The firm I work for operates a number of offices across scotland and has over 300 staff. There are various different versions of excel running from 97 up to 2003 and also a number of different service packs are installed so whilst I'm on 2000 SP-3 some of my colleagues are on 2000 SR-1. You get the idea. Lately I have been building models for various parties around the firm and whilst they work perfectly on my machine the macros often don't work on other machines. eg Problem 1 - a macro compares a date to the values in a range of cells. On some machines the empty cell is being read as an empty string (ie "") and causing a type mismatch error (due to string being compared to number) whilst on my machine the empty cell is being read as zero and it works (number being compared to number). Relevant code (dDeadlineStart contains a date)... Dim DeadLineStart As Long DeadLineStart = Range("dDeadlineStart").Value If Format(Cells(xloop, yloop).Value, "0") = DeadLineStart the error happens at the IF statement Problem 2 - Clicking on a cancel button on a dialog box I created caused an error then crashed excel. Clicking on the cancel button of a different dialog box (which I also created) caused the same error and again crashed excel. Unfortunately I didn't note the error. Relevant code... Private Sub cmdCancel() Unload frmDeleteUnit End Sub I am becoming fed up of creating models which operate perfectly on my machine but not on others. I know its unhelpful not to have the error for the 2nd problem but if any of you can shed any light on why this might be happening I'd be grateful. Thanks in advance Stuart |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Version Problem | Excel Discussion (Misc queries) | |||
Version Problem | Excel Worksheet Functions | |||
Version Problem | Excel Worksheet Functions | |||
version problem | Excel Discussion (Misc queries) | |||
VBA version problem | Excel Programming |