ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Copying code (https://www.excelbanter.com/new-users-excel/108992-copying-code.html)

wal50

Copying code
 
New to VBA so ...
I have copied some of the great code from CPearson.com. If I open a new
workbook and add the code to a new module. it works for that workbook (only).
What I want to do is add it to personal.xls so it works in all workbooks. I
can't get this to happen. I add a new module to personal.xls, copy the code
and it doesn't work. Other macros that I have in Personal.xls work fine in
all books.
Any ideas?
Thanks.
WAL50

Gord Dibben

Copying code
 
What is "doesn't work"?

Error message? Incorrect results? Nothing?

If you copied a Function from Chip's site and placed it in your Personal.xls you
have to preface the Function like so or you will get the #NAME? error in the
cell.

=Personal.xls!Function()

If not a Function, but a Sub then tell us which one from Chip's site.


Gord Dibben MS Excel MVP

On Thu, 7 Sep 2006 13:56:02 -0700, wal50
wrote:

New to VBA so ...
I have copied some of the great code from CPearson.com. If I open a new
workbook and add the code to a new module. it works for that workbook (only).
What I want to do is add it to personal.xls so it works in all workbooks. I
can't get this to happen. I add a new module to personal.xls, copy the code
and it doesn't work. Other macros that I have in Personal.xls work fine in
all books.
Any ideas?
Thanks.
WAL50



wal50

Copying code
 
"doesn't work" is a frequently used term meaning "this should be working but
I have no idea why it doesn't". Anyway, you resolved my problem (#Name).
Thanks.
WAL50


"Gord Dibben" wrote:

What is "doesn't work"?

Error message? Incorrect results? Nothing?

If you copied a Function from Chip's site and placed it in your Personal.xls you
have to preface the Function like so or you will get the #NAME? error in the
cell.

=Personal.xls!Function()

If not a Function, but a Sub then tell us which one from Chip's site.


Gord Dibben MS Excel MVP

On Thu, 7 Sep 2006 13:56:02 -0700, wal50
wrote:

New to VBA so ...
I have copied some of the great code from CPearson.com. If I open a new
workbook and add the code to a new module. it works for that workbook (only).
What I want to do is add it to personal.xls so it works in all workbooks. I
can't get this to happen. I add a new module to personal.xls, copy the code
and it doesn't work. Other macros that I have in Personal.xls work fine in
all books.
Any ideas?
Thanks.
WAL50




SteveW

Copying code
 
On Fri, 08 Sep 2006 14:15:02 +0100, wal50
wrote:

"doesn't work" is a frequently used term meaning "this should be working
but
I have no idea why it doesn't".

That's the obvious part

Anyway, you resolved my problem (#Name).


Thats what was wanted in the first place

Thanks.
WAL50


Glad it works

Steve


"Gord Dibben" wrote:

What is "doesn't work"?

Error message? Incorrect results? Nothing?

If you copied a Function from Chip's site and placed it in your
Personal.xls you
have to preface the Function like so or you will get the #NAME? error
in the
cell.

=Personal.xls!Function()

If not a Function, but a Sub then tell us which one from Chip's site.


Gord Dibben MS Excel MVP

On Thu, 7 Sep 2006 13:56:02 -0700, wal50

wrote:

New to VBA so ...
I have copied some of the great code from CPearson.com. If I open a

new
workbook and add the code to a new module. it works for that workbook

(only).
What I want to do is add it to personal.xls so it works in all

workbooks. I
can't get this to happen. I add a new module to personal.xls, copy

the code
and it doesn't work. Other macros that I have in Personal.xls work

fine in
all books.
Any ideas?
Thanks.
WAL50


Gord Dibben

Copying code
 
In addition, the frequently used term "doesn't work" is a non-descriptive term

which is of absolutely no use to anyone attempting to troubleshoot a problem.

I guessed and this time was lucky.


Gord

On Fri, 8 Sep 2006 06:15:02 -0700, wal50
wrote:

"doesn't work" is a frequently used term meaning "this should be working but
I have no idea why it doesn't". Anyway, you resolved my problem (#Name).
Thanks.
WAL50


"Gord Dibben" wrote:

What is "doesn't work"?

Error message? Incorrect results? Nothing?

If you copied a Function from Chip's site and placed it in your Personal.xls you
have to preface the Function like so or you will get the #NAME? error in the
cell.

=Personal.xls!Function()

If not a Function, but a Sub then tell us which one from Chip's site.


Gord Dibben MS Excel MVP

On Thu, 7 Sep 2006 13:56:02 -0700, wal50
wrote:

New to VBA so ...
I have copied some of the great code from CPearson.com. If I open a new
workbook and add the code to a new module. it works for that workbook (only).
What I want to do is add it to personal.xls so it works in all workbooks. I
can't get this to happen. I add a new module to personal.xls, copy the code
and it doesn't work. Other macros that I have in Personal.xls work fine in
all books.
Any ideas?
Thanks.
WAL50




Gord Dibben MS Excel MVP


All times are GMT +1. The time now is 10:02 AM.

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