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
> 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".
Try if it helps to set all arguments of the Find method. If you omit arguments,
the Find method uses the last used options, even if changed by the user when
doing a manual find.
Regards,
Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com
Thanks again,
MJ
"Jan Karel Pieterse" wrote:
> .
>
> a COM add-in was causing the problem
Thanks for letting me know!