ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro works for some users and not others (https://www.excelbanter.com/excel-discussion-misc-queries/134788-macro-works-some-users-not-others.html)

kfell

Macro works for some users and not others
 
Hello,

I have a macro that runs Ok for me but crashes out with a runtime error for
a colleague. The macro opens another spreadsheet, searches through a list
for a match and then copies information back to the original spreadheet. It
runs fine for me but my colleague gets a runtime error9.
We are using the same version of excel.
Has anyone got any ideas?

Gary''s Student

Macro works for some users and not others
 
Do all users have the same file structure?
--
Gary''s Student
gsnu200710


"kfell" wrote:

Hello,

I have a macro that runs Ok for me but crashes out with a runtime error for
a colleague. The macro opens another spreadsheet, searches through a list
for a match and then copies information back to the original spreadheet. It
runs fine for me but my colleague gets a runtime error9.
We are using the same version of excel.
Has anyone got any ideas?


kfell

Macro works for some users and not others
 
Yep, same file structure we're opening it from the same place and using the
same files.

"Gary''s Student" wrote:

Do all users have the same file structure?
--
Gary''s Student
gsnu200710


"kfell" wrote:

Hello,

I have a macro that runs Ok for me but crashes out with a runtime error for
a colleague. The macro opens another spreadsheet, searches through a list
for a match and then copies information back to the original spreadheet. It
runs fine for me but my colleague gets a runtime error9.
We are using the same version of excel.
Has anyone got any ideas?


Jim Rech

Macro works for some users and not others
 
but my colleague gets a runtime error9.

You should always report the text of the error message, if there is any.
Codes do not usually mean one specific thing.

--
Jim
"kfell" wrote in message
...
| Hello,
|
| I have a macro that runs Ok for me but crashes out with a runtime error
for
| a colleague. The macro opens another spreadsheet, searches through a list
| for a match and then copies information back to the original spreadheet.
It
| runs fine for me but my colleague gets a runtime error9.
| We are using the same version of excel.
| Has anyone got any ideas?



kfell

Macro works for some users and not others
 
Sorry. Run time Error 9 - subscript out of range

"Jim Rech" wrote:

but my colleague gets a runtime error9.


You should always report the text of the error message, if there is any.
Codes do not usually mean one specific thing.

--
Jim
"kfell" wrote in message
...
| Hello,
|
| I have a macro that runs Ok for me but crashes out with a runtime error
for
| a colleague. The macro opens another spreadsheet, searches through a list
| for a match and then copies information back to the original spreadheet.
It
| runs fine for me but my colleague gets a runtime error9.
| We are using the same version of excel.
| Has anyone got any ideas?




Jim Rech

Macro works for some users and not others
 
You should be able to debug this when the debugger stops on the line of code
that generates this error. That line is a roadmap to the problem.

For example:

Worksheets("abc").Select

will generate this exact message if there is no worksheet named "abc" in the
active workbook.

Something is missing when the code is run on the problem machines but we
can't say what it is without seeing the code. But I encourage you to try to
figure it out<g.

--
Jim
"kfell" wrote in message
...
| Sorry. Run time Error 9 - subscript out of range
|
| "Jim Rech" wrote:
|
| but my colleague gets a runtime error9.
|
| You should always report the text of the error message, if there is any.
| Codes do not usually mean one specific thing.
|
| --
| Jim
| "kfell" wrote in message
| ...
| | Hello,
| |
| | I have a macro that runs Ok for me but crashes out with a runtime
error
| for
| | a colleague. The macro opens another spreadsheet, searches through a
list
| | for a match and then copies information back to the original
spreadheet.
| It
| | runs fine for me but my colleague gets a runtime error9.
| | We are using the same version of excel.
| | Has anyone got any ideas?
|
|
|



Bob I

Macro works for some users and not others
 
They haven't happened to change the list separator character on the
problem PC?

kfell wrote:

Sorry. Run time Error 9 - subscript out of range

"Jim Rech" wrote:


but my colleague gets a runtime error9.


You should always report the text of the error message, if there is any.
Codes do not usually mean one specific thing.

--
Jim
"kfell" wrote in message
...
| Hello,
|
| I have a macro that runs Ok for me but crashes out with a runtime error
for
| a colleague. The macro opens another spreadsheet, searches through a list
| for a match and then copies information back to the original spreadheet.
It
| runs fine for me but my colleague gets a runtime error9.
| We are using the same version of excel.
| Has anyone got any ideas?






All times are GMT +1. The time now is 10:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com