+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Macro stopped working

  1. #1
    Registered User
    Join Date
    10-13-2010
    Location
    Wichita
    MS-Off Ver
    Excel 2007
    Posts
    4

    Macro stopped working

    Usually I can solve most programming issues by surfing the web, but this one is different.
    About 2 months ago my work moved from Office 2003 to Office 2007. My macros worked for a little while but then some stopped. Basically any macro that executes on a selection in a worksheet will now only partially work on the first cell. For instance:

    Please Login or Register  to view this content.
    This is a macro I have used without hickup for 2+ years, until recently.

    Basically this is a complicated way of writing a cell formula in a cell. It was made more complicated because I had to trick it into updating when the referenced cell updated. If I enter "A4" in cell B5 and highlight B5 and run this macro, it will write a cell formula to B5 which will return the cell formula of A4. Fine and good. When the formula in A4 changes, B5 is automatically updated. If you highlight a range (always had to drag to the left and down to work properly), it would do the same for all cells in the range. Now it only does the first cell. The funny thing is it never executes past the line:

    Please Login or Register  to view this content.
    I can put a msgbox after this line and it will never come up, before the line it will.

    What gives?

    BTW: Function cellformula:
    Please Login or Register  to view this content.
    Last edited by davesexcel; 10-13-2010 at 06:51 AM.

  2. #2
    Registered User
    Join Date
    10-13-2010
    Location
    Wichita
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro stopped working

    OK. Here is a sample. A text file of personal macro is also inserted. Unfortunately this file worked the right way when I made it.

    So it's an intermittent problem. Maybe a windows setting, corporate security settings, or? Maybe my seed file was made in Excel 2003 and I need to throw it away? Any suggestions?

    Thanks again.
    Attached Files Attached Files

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro stopped working

    Did it ever work?

    Please Login or Register  to view this content.
    In the sheet

    =cellformula(G6)
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    10-13-2010
    Location
    Wichita
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro stopped working

    royUK:

    It also works, but not the problem I am trying to solve. Your method uses a range directly. Mine passes a reference to a cell range (maybe the wrong terminology).

    This may not be an appropriate venue for my question. Since it works sometimes I think I have problems like those suggested in prior post.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro stopped working

    The code in your text file is not the same as that in the example workbook

  6. #6
    Registered User
    Join Date
    10-13-2010
    Location
    Wichita
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro stopped working

    royUK:

    The text file is for the personal macros workbook. The workbook contains the function cellformula, which is part of the formula written to the cell when the macro is run. With the exception of the first two lines (used to provide a hotkey shortcut to the macro), I think the original post and the sample workbook and macros file are in agreement(?).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1