Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default wkbModel.wb_Activate

there is a macro that sends an email which has been working for ages. Now
suddenly it fails on the row below, message stating that it cannot find the
macro.

Application.Run "wkbModel.wb_Activate"

i cannot find a macro with this name in the workbook and the .wb completely
throws me.

I will be grateful for any ideas as to what this might be.

many thanks
--
with kind regards

Spike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default wkbModel.wb_Activate

When you create a new module in the VBE, excel names it Module1, Module2, ...

But you can rename it to any (legal) name you want.

In this case, it looks like someone renamed one of the modules to wkbModel.

So look for that module in the project explorer (hit ctrl-r to see if it's not
visible).

If you don't have a module by that name in that workbook, then this is a
problem. Maybe it was deleted or renamed.

Next, look for that procedure (wb_activate). It's just a name and nothing to do
with any of the events that excel monitors.

If you find it in a different module, you can change the line from:

Application.Run "wkbModel.wb_Activate"
to
Application.Run "NewModuleName.wb_Activate"
or simply:
call NewModuleName.wb_Activate

And if there's only one procedure with the wb_activate name, you don't even need
the module name:
Call wb_Activate
Is sufficient.

If you can't find a procedure with this name (wb_activate), then you may be able
to copy it from a old version (or from a backup file????).



Spike wrote:

there is a macro that sends an email which has been working for ages. Now
suddenly it fails on the row below, message stating that it cannot find the
macro.

Application.Run "wkbModel.wb_Activate"

i cannot find a macro with this name in the workbook and the .wb completely
throws me.

I will be grateful for any ideas as to what this might be.

many thanks
--
with kind regards

Spike


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default wkbModel.wb_Activate

Thank you for that, looks like someone has deleted it. The ".wb" threw me.
--
with kind regards

Spike


"Dave Peterson" wrote:

When you create a new module in the VBE, excel names it Module1, Module2, ...

But you can rename it to any (legal) name you want.

In this case, it looks like someone renamed one of the modules to wkbModel.

So look for that module in the project explorer (hit ctrl-r to see if it's not
visible).

If you don't have a module by that name in that workbook, then this is a
problem. Maybe it was deleted or renamed.

Next, look for that procedure (wb_activate). It's just a name and nothing to do
with any of the events that excel monitors.

If you find it in a different module, you can change the line from:

Application.Run "wkbModel.wb_Activate"
to
Application.Run "NewModuleName.wb_Activate"
or simply:
call NewModuleName.wb_Activate

And if there's only one procedure with the wb_activate name, you don't even need
the module name:
Call wb_Activate
Is sufficient.

If you can't find a procedure with this name (wb_activate), then you may be able
to copy it from a old version (or from a backup file????).



Spike wrote:

there is a macro that sends an email which has been working for ages. Now
suddenly it fails on the row below, message stating that it cannot find the
macro.

Application.Run "wkbModel.wb_Activate"

i cannot find a macro with this name in the workbook and the .wb completely
throws me.

I will be grateful for any ideas as to what this might be.

many thanks
--
with kind regards

Spike


--

Dave Peterson
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"