A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro is not working properly



 
 
Thread Tools Display Modes
  #1  
Old December 25th, 2009, 11:43 AM posted to microsoft.public.excel.misc
Sherees
external usenet poster
 
Posts: 43
Default Macro is not working properly


--
Life isa journey not a destination
  #2  
Old December 25th, 2009, 12:39 PM posted to microsoft.public.excel.misc
Sherees
external usenet poster
 
Posts: 43
Default Macro is not working properly

Merry X'mas
created an excel file with macros in it for printing. when i saved this file
on other computers, the buttons with macros assigned is not working. Is it
because that i changed the file name when i was saving it on other computer,
but when i changed it to the previous name then also the macros are not
working, please advice the solution. The file is properly working in the
computer from where i created the macros, even thoughthe file name is
changed. Macros were enabled in all the computers.

Thanks & rgds
--
Life isa journey not a destination


"Sherees" wrote:


--
Life isa journey not a destination

  #3  
Old December 25th, 2009, 02:29 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Macro is not working properly

My first guess is that the security setting in the recipient's pc is set to
disable macros.

Depending on the version of excel they're using, you can toggle it:

In xl2003 menus:
tools|macro|security|security level tab
set it for medium

The user will be asked if they want to enable macros when they open a file with
macros. If they answer yes, then your macros should work.

If they answer no, you'll have to teach them that they want to answer yes for
this workbook.

If this doesn't help, you'll have to explain what not working means.

Sherees wrote:

Merry X'mas
created an excel file with macros in it for printing. when i saved this file
on other computers, the buttons with macros assigned is not working. Is it
because that i changed the file name when i was saving it on other computer,
but when i changed it to the previous name then also the macros are not
working, please advice the solution. The file is properly working in the
computer from where i created the macros, even thoughthe file name is
changed. Macros were enabled in all the computers.

Thanks & rgds
--
Life isa journey not a destination

"Sherees" wrote:


--
Life isa journey not a destination


--

Dave Peterson
  #4  
Old December 25th, 2009, 03:27 PM posted to microsoft.public.excel.misc
Sherees
external usenet poster
 
Posts: 43
Default Macro is not working properly

I assigned macro to a button to print specified areas, this was properly
working in the computer in which i created this file. I gave the file name
GWR.xls while creating it. After the work is complete i moved it to a new
folder with a different file name and the same was carried to other computer.
Now when i clicked the button from other computer, the error message read
something like this"'file GWR does not exist,..and so on''. so i changed the
file name back to GWR, even then the buttons were not working. Macros is
enabled. Will the macros stop fucntioning if the name of the file is changed?
--
Life isa journey not a destination


"Dave Peterson" wrote:

My first guess is that the security setting in the recipient's pc is set to
disable macros.

Depending on the version of excel they're using, you can toggle it:

In xl2003 menus:
tools|macro|security|security level tab
set it for medium

The user will be asked if they want to enable macros when they open a file with
macros. If they answer yes, then your macros should work.

If they answer no, you'll have to teach them that they want to answer yes for
this workbook.

If this doesn't help, you'll have to explain what not working means.

Sherees wrote:

Merry X'mas
created an excel file with macros in it for printing. when i saved this file
on other computers, the buttons with macros assigned is not working. Is it
because that i changed the file name when i was saving it on other computer,
but when i changed it to the previous name then also the macros are not
working, please advice the solution. The file is properly working in the
computer from where i created the macros, even thoughthe file name is
changed. Macros were enabled in all the computers.

Thanks & rgds
--
Life isa journey not a destination

"Sherees" wrote:


--
Life isa journey not a destination


--

Dave Peterson
.

  #5  
Old December 25th, 2009, 05:26 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Macro is not working properly

I'm not sure how you created the button or where that button is.

If you used a button from the Forms toolbar and placed that button on the
worksheet, the simplest solution is to replace that button with a commandbutton
from the Control toolbox toolbar.

After you delete the old button and add the new commandbutton, just double click
on it and you'll see soemthing like:

Option Explicit
Private Sub CommandButton1_Click()

End Sub
(depending on what you named the commandbutton)

You'll have to move your code from the General module and maybe modify it
slightly. But you won't have any trouble when you share that workbook.



On the other hand...

If you created a button on a toolbar in xl2003 or lower, then the simplest fix
is to just reassign the macro in the correct workbook to the button. You can
use:

Tools|Customize (just to see that dialog)
Rightclick on the button on the toolbar
And choose Assign Macro
(and do that assignment again)

If you create enough of these helpful macros that you share with others, then
this becomes a royal pain. Instead of doing the creation of the button (and
attaching the toolbar to the workbook), you can use a macro that creates the
toolbar, assigns the macro, and even deletes that toolbar when the macro
workbook closes.

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



Sherees wrote:

I assigned macro to a button to print specified areas, this was properly
working in the computer in which i created this file. I gave the file name
GWR.xls while creating it. After the work is complete i moved it to a new
folder with a different file name and the same was carried to other computer.
Now when i clicked the button from other computer, the error message read
something like this"'file GWR does not exist,..and so on''. so i changed the
file name back to GWR, even then the buttons were not working. Macros is
enabled. Will the macros stop fucntioning if the name of the file is changed?
--
Life isa journey not a destination

"Dave Peterson" wrote:

My first guess is that the security setting in the recipient's pc is set to
disable macros.

Depending on the version of excel they're using, you can toggle it:

In xl2003 menus:
tools|macro|security|security level tab
set it for medium

The user will be asked if they want to enable macros when they open a file with
macros. If they answer yes, then your macros should work.

If they answer no, you'll have to teach them that they want to answer yes for
this workbook.

If this doesn't help, you'll have to explain what not working means.

Sherees wrote:

Merry X'mas
created an excel file with macros in it for printing. when i saved this file
on other computers, the buttons with macros assigned is not working. Is it
because that i changed the file name when i was saving it on other computer,
but when i changed it to the previous name then also the macros are not
working, please advice the solution. The file is properly working in the
computer from where i created the macros, even thoughthe file name is
changed. Macros were enabled in all the computers.

Thanks & rgds
--
Life isa journey not a destination

"Sherees" wrote:


--
Life isa journey not a destination


--

Dave Peterson
.


--

Dave Peterson
  #6  
Old December 26th, 2009, 10:18 AM posted to microsoft.public.excel.misc
FloMM2
external usenet poster
 
Posts: 189
Default Macro is not working properly

Sherees,
Since you didn't post the macro for inspection and help. I will take a shot
in the dark for you.
Look at the coding of your macro, if it refers to the workbook by name, then
eventhough you rename it, the macro is still looking for the original file.
The easy fix to this is:
The file with its new name on the machine that is going to use your macro,
Open the excel VB editor and check the macro code.
If it refers to file GWR.xls or whatever you named it originally, then just
change the reference to the new name and save.

hth

"Sherees" wrote:

I assigned macro to a button to print specified areas, this was properly
working in the computer in which i created this file. I gave the file name
GWR.xls while creating it. After the work is complete i moved it to a new
folder with a different file name and the same was carried to other computer.
Now when i clicked the button from other computer, the error message read
something like this"'file GWR does not exist,..and so on''. so i changed the
file name back to GWR, even then the buttons were not working. Macros is
enabled. Will the macros stop fucntioning if the name of the file is changed?
--
Life isa journey not a destination


"Dave Peterson" wrote:

My first guess is that the security setting in the recipient's pc is set to
disable macros.

Depending on the version of excel they're using, you can toggle it:

In xl2003 menus:
tools|macro|security|security level tab
set it for medium

The user will be asked if they want to enable macros when they open a file with
macros. If they answer yes, then your macros should work.

If they answer no, you'll have to teach them that they want to answer yes for
this workbook.

If this doesn't help, you'll have to explain what not working means.

Sherees wrote:

Merry X'mas
created an excel file with macros in it for printing. when i saved this file
on other computers, the buttons with macros assigned is not working. Is it
because that i changed the file name when i was saving it on other computer,
but when i changed it to the previous name then also the macros are not
working, please advice the solution. The file is properly working in the
computer from where i created the macros, even thoughthe file name is
changed. Macros were enabled in all the computers.

Thanks & rgds
--
Life isa journey not a destination

"Sherees" wrote:


--
Life isa journey not a destination


--

Dave Peterson
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:05 PM.


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