VBA Error on only some computers

  • Thread starter Thread starter powlaz
  • Start date Start date
P

powlaz

I created a workbook (with some help) that consists of one spreadsheet with 2
colums populated and a user form. The spreadsheet colums are for zip code
and the town associated with the zip code.

When the user opens this workbook Excel "disappears" and only the user form
is left visible. The user is then supposed to enter a zipcode and click
'Submit' after which the town associated with the zip will show on the form.

The workbook works exactly as I'd like. I took it a step further and
compiled the workbook into an executable using XLtoEXE. After the compiling
I am finding that the program only works on some of my PCs.

All test PCs are running Windows XP SP3 and Office 2003. They were all
built from the same image and should be fairly identical (security in place
prevents the users from making too many changes).

On PC 1 if the user enters a zip code and clicks "Submit" the result is
returned.
On PC2 when the user enters a zip code and clicks "Submit" an error is
returned:
"Run-time error '50290': Application-defined or object-defined error"

When I click "Debug" the highlighted line is this:
Set myRange = Sheets("Profit Center
Lookup").Range("A:A").Find(TextBox1.Value, LookIn:=xlValues)

I can't see anything wrong with it. And the problem doesn't exist if this
workbook isn't running as a program and only exists 1/2 of the time when it
is running as a program. I wonder if there's an adjustment I need to make so
that the workbook doesn't trip up on itself - the only sheet in the entire
workbook is the "Profit Center Lookup".

I've written the maker of XLtoEXE to see if he can help. I am not super
proficient with VBA so anything you can give me to think about will be much
appreciated.

MJ
 
Thank you for the reply. It took me a while to find my post again. I wish
there was a way to bookmark them or a better way to search (I never remember
my subject). Anyway a COM add-in was causing the problem. Once I took care
of that everything worked as expected.

Thanks again,

MJ
 
Back
Top