Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with assigining a macro.


Hello,

I have created a floating menu bar with 3 menu buttons on it. I have
written a sub programs for each button, for the action to be performed
when the menu buttons are clicked. And I have assigned the code to the
buttons using "Assign macro". This works fine unitll the workbook is
closed. When I close & re-open the workbook and click on menu
buttons....I get a message that it could not find assigned macros. I
saved the workbook before closing. I tried many times, but could not
find the reason. Please help.

Thanks,
Shashi


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile: http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=509361

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Problem with assigining a macro.

run a macro to check on the assignment

Sub showAssignments()
for each btn in CommandBars("MyBar").Controls
msgbox btn.Caption & vbNewline & btn.OnAction
Next
End Sub

Try it before closing the workbook, when the workbook is closed and when
you have a problem.


I create custom bars all the time when I am testing things. I will make
them visible weeks or months later, and click a button and it opens some old
file it was assigned to and runs the macro. So this isn't typical.

--
Regards,
Tom Ogilvy


"shashi1515" wrote
in message ...

Hello,

I have created a floating menu bar with 3 menu buttons on it. I have
written a sub programs for each button, for the action to be performed
when the menu buttons are clicked. And I have assigned the code to the
buttons using "Assign macro". This works fine unitll the workbook is
closed. When I close & re-open the workbook and click on menu
buttons....I get a message that it could not find assigned macros. I
saved the workbook before closing. I tried many times, but could not
find the reason. Please help.

Thanks,
Shashi


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile:

http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=509361



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Problem with assigining a macro.

You need to attach the floating menu bar to the workbook - use the attach
command in the worksheet menu bar to do this.

--
www.alignment-systems.com


"shashi1515" wrote:


Hello,

I have created a floating menu bar with 3 menu buttons on it. I have
written a sub programs for each button, for the action to be performed
when the menu buttons are clicked. And I have assigned the code to the
buttons using "Assign macro". This works fine unitll the workbook is
closed. When I close & re-open the workbook and click on menu
buttons....I get a message that it could not find assigned macros. I
saved the workbook before closing. I tried many times, but could not
find the reason. Please help.

Thanks,
Shashi


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile: http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=509361


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Problem Kumar Excel Discussion (Misc queries) 1 April 29th 09 09:51 AM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Assigining User Defined Functions to Categories in Addins Jim Excel Worksheet Functions 0 June 27th 06 12:09 PM
Macro Problem Kevin Excel Discussion (Misc queries) 1 December 9th 04 06:55 PM


All times are GMT +1. The time now is 09:38 AM.

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"