macro trouble

needhelp2

Active Member
Joined
Apr 19, 2011
Messages
250
Hi All,

I am using buttons in sheet. when i record macro then it was working fine and i save it successfully.

Now after reopening file on pressing button it shows two errors
"Can not run the macro "test.xlsx'!button1_click'.The macro may not be avalible in workbook or all macro may be disable"

The code is not available now in view code window.

Kindly please tell me how i can save macros permanently.because it removes every time when i close my file.


Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
The first thing you need to do is to tell folks which version of Excel you're using. If you look in the notes on using the board's Forum Posting Guide:
http://www.mrexcel.com/forum/showthread.php?t=515787 this is shown at number 7.
I'm assuming you're using 2007 or 2010, as part of your message refers to disabled macros, and one of the references is ".xlxs

1. When recording your macro, as well as naming it you need to also decide where it's stored. The options for this are either a new workbook, the workbook you're using, or your Personal Workbook. The personal workbook's often better, as it's always available to you on that computer, for use with all workbooks.
However, if you wish the macro to be portable, then save it in the workbook which you'll be taking to other computers. This just means it'll only be available to that workbook.

2. In order for a workbook to have macros available, you need to save it in the format ".XLSM i.e. a Macro-enabled workbook. Bearing in mind that part of your message refers to "...Test.xlsx" I'm assuming your problem is that you've not saved the workbook in the correct format (.XLSM).

3. Another problem with 2007/2010 is that if Excel doesn't like some macros it'll disable the workbook or add-in, so check the help files for enabling add-inns and workbooks.

4. Finally, check the security centre settings for your machine (or profile if you're working on a network) and ensure that macros & Active X controls etc are enabled.

First thing though is to try saving your workbook as XLSM, and re-recording the code - saving it in the workbook.
 
Upvote 0
Thats great lovwe you all guys to reply.
I was using 2007 office. and i was not saving it as "Excel macro enabled workbook"
well thanx it done due to your kind guide line.
Thanks alot again.

Further please guide me is there any easy mean from i can learn macros?
 
Upvote 0
Glad to be of help needhelp2. This is a great font of knowledge, and a great resource of many people willing to help each other.
Just be sure to come back and help once you get the hang of it!!

For further learning, I'd suggest looking at the Mr Excel online store:
http://www.mrexcel.com/store/index.php
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top