ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   macro (https://www.excelbanter.com/excel-worksheet-functions/59469-macro.html)

ditzafar

macro
 

When I recording the macro I can use it in others workbooks, but when
I'm typing the code in v.b I can use the macro only on the specific
workbook. I have no idea what can be the problem. thanks.


--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile: http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=491822


Kleev

macro
 
Where are you putting the code? Try inserting a module and then typing the
code (or copying/moving it) there. Then you should be able to bring it up
using Alt-F8.

"ditzafar" wrote:


When I recording the macro I can use it in others workbooks, but when
I'm typing the code in v.b I can use the macro only on the specific
workbook. I have no idea what can be the problem. thanks.


--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile: http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=491822



Gord Dibben

macro
 
ditz

I'm guessing that when you record a macro you are recording to your "personal
macro workbook" which is Personal.xls and is the storage file for global
macros.

When you go into the VBE you may be typing the code into the workbook that is
open.

Type your code into the Personal.xls module(s)

When in the VBEditor look for Personal.xls and expand it to see the module(s)
to edit or type new code into.

Also make sure any coding lines refer to ActiveWorkbook and ActiveSheet and
not hard-coded to a specific book or sheet.


Gord Dibben Excel MVP

On Thu, 8 Dec 2005 08:45:13 -0600, ditzafar
wrote:


When I recording the macro I can use it in others workbooks, but when
I'm typing the code in v.b I can use the macro only on the specific
workbook. I have no idea what can be the problem. thanks.



All times are GMT +1. The time now is 05:42 AM.

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