Macro is not working properly

-- 
Life isa journey not a destination
0
Utf
12/25/2009 10:43:01 AM
excel.misc 78881 articles. 5 followers. Follow

5 Replies
625 Views

Similar Articles

[PageSpeed] 22

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
0
Utf
12/25/2009 11:39:02 AM
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
0
Dave
12/25/2009 1:29:14 PM
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
> .
> 
0
Utf
12/25/2009 2:27:01 PM
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
0
Dave
12/25/2009 4:26:09 PM
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
> > .
> > 
0
Utf
12/26/2009 9:18:01 AM
Reply:

Similar Artilces:

Macro Digital Sig
Outlook 2007 I have a macro in ThisOutlookSession (setsavefolder, from SM) I know I can allow all macros via Trust Centre, but I recollect there is a method of adding a personal digital signature to this macro, I can find instructions for Outlook2k, but not sure if these are relevant to 2007 Thanks Should be the same, other than the location of selfcert.exe. That's the program you can use to sign your VBA project. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Op...

Set up basic Macro in EXcel to use in other applications
Hi There are certain repetitive entries in another application that are preformed on a daily basis. I understand there is a way that you can record these basic macros in Excel and are able to perform or use them for other applications. Can anyone tell be how this is done or point me in the right direction to find this information. It is basic entry and copy paste steps that I need to record. I am about an intermediate user but if it is explained to me I could probably figure it out. I use exel 97 and also have 2003 ...

Can Outlook 2003 work with Word 2002 so as to provide Wordmail?
Hello, I've been considering getting Outlook 2003 (not with the full Office Suite). Can Outlook 2003 work with Word 2002 so as to provide Wordmail? Thanks, Jeff No. For that feature, and several others (including using Word for mail merge), the versions of Word and Outlook must match. -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:ev%23nAiCpDHA.1672@TK2MSFTNGP09.phx.gbl, JMI wrote: > Hello, > > I've been considering getting Outlo...

Find by Lastname does not work, until we click by Firstname, then
Hello, I have a problem in my Find Form that when I chose by Last name, it won't work, I have to go to option 2 by Fist name, then to by Last name then it works. Can anyone help me how to solve this problem? This is my VBA: Private Sub optChoose_AfterUpdate() ' Populate rowsource of cboSelect Dim strSQL As String On Error GoTo HandleErr Select Case optChoose Case 1 ' NamaAkhir/Marga strSQL = "Select Distinct LName from BukuAngKbyQuery " _ & "Order By LName" Case 2 &#...

Calendar reminder doesn't work
Some of our users reminder doesn't work with outlook 2003 and Exchange 2003. Although they configure the reminder correctly they don't get the reminder 15 minutes before the start time. Has anyone an idea what could cause this problem. TIA, Martin Hi Martin, There can be several different reasons why your users are not receiving reminders as expected. For more information on this issue, please refer to Knowledge Base article KB;EN-US;286166 You can access this article by clicking on the link below. http://support.microsoft.com/default.aspx?scid=KB;EN-US;286166 Thanks, Sc...

How to send a message from a control to be catched by the ON_CONTROL() macro?
Hi, I wish to define a custom control message WM_CBN_ENTERKEY so that the window containing the combo box can detect an ENTER key press event. I created a class CMyComboBox (derived from CComboBox): #define WM_CBN_ENTERKEY WM_USER+100 BOOL CMyComboBox::PreTranslateMessage(MSG* pMsg) { if ((pMsg->message != WM_KEYDOWN) || (pMsg->wParam != VK_RETURN)) return CComboBox::PreTranslateMessage(pMsg); if ((pMsg->lParam & 0x40000000) == 0) // Not a repeat. { LPARAM lParam; WPARAM wParam; lParam=MAKELPARAM(0,(WORD)WM_CBN_ENTERKEY); wParam=(WPARAM)m_nControlID; // not su...

Word spell checker not working
Somehow the automatic spelling and grammar checker is not working correctly. Maybe my settings are incorrect, but they don’t appear to be. I type text that is obviously incorrect, and the spell checker does not detect it. I have never intentionally set any settings to do not check spelling or grammar. I have captured print screen images of text that is obviously incorrect, combined with the settings showing that automatic spell checker is on. Unfortunately I can not copy and paste these images in to this post. If anyone would like to see a copy of the spell check complete n...

Working with weekdays
Hi, I am trying to add and subtract weekdays. Example I must schedule the delivery of the printer two days prior to the scheduled 7/10/2006 training date. High Level Formula: Training Date - 2 days lead time = delivery date What commands should I use to calculate the delivery date? Assuming you do not want to include weekends as delivery dates. =WORKDAY(A1,-2) Where your training date is in A1. You can also have this ignor holidays. List your holidays in a range say C1:C10. Your formul would then be, =WORKDAY(A2,-2,C1:C10) If you want holidays and weekends included then...

VBA or Macro Help: Create new files based on dynamic text in a tab
I have 7 tables in a Word doc. Each table has a cell for "Owner". Suzy is the owner in 4 of the tables, John is the owner in 3. I want to loop through all possible owners (in this case, 2), find each table that belongs to them, and create a new file for each owner. At the end of the macro, I'd have a file called "Suzy.doc" with her 4 tables appended and one called "John.doc" with his 3 tables appended. I could code this back in the day by looping through a 'getOwner-readWordDoc-testCondition-writeRecord' loop-until-end. But, I can&#...

Stop macro if cell selected
Hi, First time & new to excel macros. I have a macro which copies data & inserts it into a viewable summary sheet which can be printed. The range is 6 cells & if cell k7 is selected I want to stop the macro. I have attempted to use IF command with Then End but it ignores it. Here is my macro: ' refence point to start pasting sequence Sheets("Alfa data").Select Range("C225").Select Application.CutCopyMode = False Selection.Copy Sheets("Sheet4").Select Range("c7").Select Selection.End(xlToRight).Select Acti...

What are the parameters for print(,,,,,,,,,,,,,,,) excel4 macro?
When using the following in a VB macro ExecuteExcel4Macro _ "PRINT(1,,,1,,,,,,,,2,""HP LaserJet 2300 Series PCL 6 on LPT1:"",,TRUE,,FALSE)" Where can I find the definition for all the parameters for the PRINT() function? -- jwm I took this from XLMACR8.HLP. PRINT Macro Sheets Only Equivalent to choosing the Print command from the File menu. Prints the active workbook. Arguments correspond to options, check boxes, and edit boxes in the Print dialog box. Arguments corresponding to check boxes are logical values. If an argument is TRUE,...

archive folders dont work!
Dear Forum-mates, Since a couple of months i cannt put any email (read or unread!) in my archive folders (let say the folders which ive created under the inbox folder). Every time I drag a mail to one of the folders (doesnt matter which one!) I get the next error message: "Cann't replace Item(s). Cannot replace the Item. The item is removed or deleted or the access to the item is denied." I'm using outlook 2000, working in network environment of a company. I've xp prof. as the operating system. anybody any idea??? tnx Sam -- samuele If you have created a folder...

Simple VBA Code Working in Excel 2007 but not Excel 2003 #N/A
I have a fairly simple VBA subroutine that turns data labels on/off on a stacked bar chart as long as the value is not 0 or NA it turns on. The macro works perfectly in Excel 2007, but stops on the first #N/A value. The code stops on one of the following 2 simple commands. Series = Cells(RowNumStart + X - 1, SeriesCol).Value If WorksheetFunction.IsNA(Cells(RowNumStart + X - 1, ColNum)) Then What could be causing this. I have checked that the location in the Cells location is correct. Just as an FYI, this whole macro wasn't required in Excel 2007 because Excel 2007 won...

print work orders in landscape view?
We have a customer that isnt satisfied with Rms Work Order Layouts... so they have their own excel file that prints it, so they have had RMS for 6 months, and havent really used it, so i was wondering either if i could take the variables out of rms, and put them in excel, or print the xml work order file, in landscape view? i know the xml pretty well, and i will mess with that after this problem, but if it cant print landscape it's a no go... so if anyone knows anything please contact me. Axel Jensen NBE Solutions - Omaha Nebraska Service Tech Axel@nbesolutions.com Thank you Her...

Check names not working for multiple address books / contacts
Hello! I have upgraded from outlook 2003 to outlook 2007, my contacts are stored in pst. I used to be able to search for a name via check names and it displayed me all the results from global address list and from my contacts, but now it only does one. It does not matter which one I set in the checking order, whichever is top will be the one that provides the result. I would like it to show me both results, how would I go about to set that up? Thank you Deana More accurate and complete information would be helpful. The Global Address List is only available to those who c...

would like to buy microsoft excel 2007 WORK BOOK
would like to buy microsoft excel 2007 WORK BOOK Check BestBuy or CompUSA or any other software distributor in your area. -- HTH, Barb Reinhardt "MABAR" wrote: > would like to buy microsoft excel 2007 WORK BOOK ...

Horizontal scroll bar stopped working in an Access form
Hi, I am working on a enhancement of a Access application (backend sql server). This mainly includes a status form that has nnumerous fields. The design of this form shows both scroll bar. However, after writing some code (which works) I am not seeing the horizontal scroll bar of this form. This is a problem as without it I cannot update some of the updateable fields as the pointer to a record is missing to let me know which record I am updating. This was working till morning. I really appreciate if somebody can tell me the issue and the resolution. Thanks in advance ...

Download pictures doesn't work outlook 2007
Hello, I have a problem. I upgraded from 2003 to 2007 beta couple of days ago. I have figured out majority of new changes and things, but this is just killing me.... I unclicked the part that says "dont download pictures automatically" in trust center under "Tools" and outlook STILL DOES NOT download pics to my mails. For example I get a mail from wachovia that is in html format, all text appears along with different types of font, color, links and all that, but those little pictues do not even tho i unclicked that thing. I go and check my mail using firefox or ie t...

Did pages upload properly?
I am publishing my site to the web. I am prompted for username and p-word. After entering and clicking on OK I get the "publish to the web" pop-up box again. It seems like it worked however there is nothing at my web site (pages did not load). How long does it take for pages to load? My site would have 6 pages total. What version Publisher? What happens when you click refresh? The old pages maybe in your cache. -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.msauer.mvps.org/ news://msnews.microsoft.com "ramss" <ramss@discussions.microsoft.com&...

Non working time
I am new to Project 2007, havn't used Project in about 4 years. I can create a new calendar, based upon the Standard calendar, but can not modify it to accomadate 10 holidays and change the work hours from 8-4 to 7:30- 4:30 for the project I am going to manage. I then want to assign it to the MS Project file I create. Q1: How can I accomplish this, I can not determine how to modify and assign this new calendar? Q2: Will I have the same issues with Resource calendars, which in some cases will vary from project's base calendar? Thank you all very much Marsh Hi, &qu...

macro fails when clipborrd is empty.
using xl2003, i am copying data from a program, and using a macro to paste it into excel using text to columns. If i forget to copy the data, when i run the macro i get "run-time error 1004 - paste method of worksheet class failed". i would like to add to the macro an IF statement so when the clipboard is empty, i get a message saying so, and then i can exit the macro. How do i do this? Thanks, Tonso Maybe you could use something like: If Application.CutCopyMode = False Then MsgBox "nothing to paste" Else ActiveSheet.Range("A1").Pa...

Hide subsequent rows based on pull down list choice
I have a spreadsheet that has 9 resource concerns listed. Next to each concern is a cell with a drop down list (data validation list) where the user can choose high, medium or low. Below each resource concern are rows that have questions associated to the concern that they need to answer if they choose high or medium. I need a macro that will unhide the rows below the each concern if high or medium is chosen in the drop down list, but keep the rows hidden if the user chooses low. It needs to update each time the list is pulled down, so that if they initially choose low, but...

moving excel2002 macros to 2003
We're moving a user to a new workstation. Her old setup was wit Office2002. We're concerned about how to ensure that her numerou Excel2002 macros are saved and available on her new computer runnin Excel2003. thank yo -- Message posted from http://www.ExcelForum.com I wouldn't be surprised if all your macros worked without any changes. But the only way you'll know for sure is either by testing in xl2003 or by going live and waiting for complaints. "depleted <" wrote: > > We're moving a user to a new workstation. Her old setup was with > Office2...

Hidding Macro names and coding
I am using a record a macro option in my excels. I want to use the macro as usual with the shortcut key that i had assigned for it. Also I want to hide the names of the macros and their coding so that no one should can know how many macros that i am using and see the codings. I know how to lock the coding, so that no one can see it. I want to know how i can hide the names of the different macros. Even after hiding the names and the codings i want to use the macros with the shortcut keys. Put Option Private Module at the head of the macros module. -- HTH RP (remove nothere from the ...

Form won' tab through properly
Hi I need to create an electronic form and have been tearing my hair out about certain sections of it! I’m on Word 2007 and have been using the ‘legacy’ controls in Developer to set it up. I wanted to use the content controls as well, esp the calendar feature, but once it’s all protected and complete it won’t tab through nicely as stops on the last content control and I have to click with my mouse to carry it on. Do legacy controls and content controls not work together? Is there any way I can set the form up so it will tab straight through without stopping? -- Thank yo...