Consulting

Results 1 to 4 of 4

Thread: Problem with OnAction

  1. #1

    Problem with OnAction

    Hi,

    I have an Excel VBA macro, I run it from C:\temp.

    I have a problem with the following line:

    Sheets(F).Shapes("M").OnAction = "2012.xlsm!Copy"
    In the F sheet to the button M the macro assigment is "C:\temp\2012.xlsm!Copy"

    1. question: why put it the path (C:\temp) there (I can see from the debugger)

    2. question:
    Under 2003 it worked perfect.
    In Excel 2010 it doesn't work, it can't find the 2012.xlms!Copy. How can I correct it?

    Thanks very much

  2. #2

    Explanation

    Sorry,

    I think I have to explain my problem more precisely:
    In the zip's Result directory there are pictures to show the process.

    To test the situation, after unzip test and temp directory you have to start the Test/test.xlms and stop the debugger at the line a=1,
    You can check in button.xlms the macro assigment to button M is "C:\temp\MacroTreasury.xlms!Copy".
    After run, you get an error, the macro is not available.

    How can I achieve to have always an absolut path in the macro assigment.

    The process worked perfect under Excel 2003, but I have to switch the whole (quite big) application to Excel 2010.

    Thank very much
    Paul
    Attached Files Attached Files

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    Under 2003 it worked perfect.
    In Excel 2010 it doesn't work, it can't find the 2012.xlms!Copy. How can I correct it?
    What were the operating systems for the 2003 and the 2010 versions?

    Paul

  4. #4
    hi,

    I tested your workbook and its working fine. It asked me to recheck the data links sources though, maybe you wanna do that.

    I think your picture 3error is telling you that.
    Feedback is the best way for me to learn


    Follow the Armies

Posting Permissions

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