LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Two marcos, same shortcut

Hi Dave

I'm not sure, if that will do the trick. I have a lot of workbooks, that I
send to other users. In each is a single macro. They do not do excactly the
same, but do something related to the workbook they are in. Right now all
the macros are assigned to Ctrl+d. When a user opens a wokbook a text in one
of the cells tell the user "Fill in the form and Press Ctrl+d" to execute".
Så thats what the user does. Problem is, when the users opens more than one
workbook at a time, the Ctrl+d does not do the right thing, if a "wrong"
workbook is active. And that it is not so good, if the macro deletes a
worksheet that should not have been deleted, just because the wrong workbook
is open.

I can of course use diffenrent shortcuts, but one time or another, I run out
of keys. And for an untrained user, I think it would be to difficult to
remember, which shortcut goes with which workbook.

But anyway, you have almost convinced me, that it cannot be done, so I have
to think of another way.

Jan

Dave Peterson wrote:
ps.

You may want to run the macros another way:

For additions to the worksheet menu bar, I really like the way John
Walkenbach does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

In xl2007, those toolbars and menu modifications will show up under
the addins.

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron
de Bruin's site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks
(saved as an addin)
or
http://www.rondebruin.nl/2007addin.htm

Dave Peterson wrote:

I don't think so.

Maybe you can use D and d as the letters in your shortcuts????

Jan Kronsell wrote:

In each of two workbooks I have a macro. Both are assigned to
ctrl+d.
When only one of the workbooks are opened it works ok. When both
workvooks are opened, prbolems occur.

No matter which workbook I open first, its always the macro in the
workbook, where I first assigned the shortcut, that is run.

Is thetre any way, that I can ensure, that the macro in the active
workbook is run, when more macros are assigned til the same
shortcut key?

Jan


--

Dave Peterson



 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on Marcos abc[_2_] Excel Discussion (Misc queries) 0 May 25th 10 08:14 AM
Marcos and buttons Jo Excel Programming 4 March 16th 09 02:00 PM
Delete old Marcos cyndi Excel Discussion (Misc queries) 1 October 24th 07 10:08 PM
Marcos cjloneranger Excel Worksheet Functions 1 August 9th 05 03:39 PM
Excel Marcos Mark Allen[_2_] Excel Programming 1 July 15th 04 05:39 AM


All times are GMT +1. The time now is 06:49 PM.

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

About Us

"It's about Microsoft Excel"