#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro Name

When assigning a macro to a button it by default in 3 files automatically
assigns the file path to the name, for example macro 'fullview' becomes,
'k:\operations\richard\testfile.xls!fullview'. If then you open the file as
readonly none of the marcos work as 'Read Only' is in the title and macro
name does not include this. I've tried recreating the code but it always does
this. Any ideas on how I can stop this from happening?

Thank you in advance for any guidance that you can give.

Richard.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro Name

What kind of button is it?

Is is a button from the Forms toolbar placed on a worksheet?

If yes, try using a commandbutton from the control toolbox toolbar. There is no
assignment of macros with these commandbuttons.

Is it a button on a toolbar?

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

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)

Richard S. wrote:

When assigning a macro to a button it by default in 3 files automatically
assigns the file path to the name, for example macro 'fullview' becomes,
'k:\operations\richard\testfile.xls!fullview'. If then you open the file as
readonly none of the marcos work as 'Read Only' is in the title and macro
name does not include this. I've tried recreating the code but it always does
this. Any ideas on how I can stop this from happening?

Thank you in advance for any guidance that you can give.

Richard.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro Name

Hi Dave - it is a button from the forms toolbar. I'll replace it with a
commandbutton as a work around, though im intriged why it is happening.

Thank you for your help.

Richard.
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 recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 01:59 PM.

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"