+ Reply to Thread
Results 1 to 7 of 7

Assigned Macro Name Changed

  1. #1
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Question Assigned Macro Name Changed

    (Sorry, I peviously posted this to the Access Programing forum incorrectly. I will delete it there if I can figure out how.)

    In a workbook, I have several buttons, both on a tool bar I created. I also have word art objects within worksheets. Each has a macro assigned to it. Recently, as I have made updates to the workbooks, I have noticed that the "assigned macro" that was assigned long ago is not the macro name I originally specified. For instance, I have a macro called pickit assigned to a button whose label, not surprisingly is "Pick It". However, when I now look in the value in the "assign macro name" field for that button, it has Group30_Click as the name of the assigned macro. There is no macro named Group30_Click in the list, nor have I ever created a macro by that name. The code for the pickit macro is still named pickit. However (and pehaps fortunately), when I click the "Pick It" button, the pickit macro still runs. Other buttons I have assigned marcro names to have this transformation to GroupNN_click names and all still invoke my originally intended macros.

    What's up. There must be some feature I don't understand.
    Last edited by DanBlum; 08-29-2010 at 01:52 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Assigned Macro Name Changed

    Look behind your sheets for code instead of in the Macro Module. Group30_Click is most likely an event macro behind an individual sheet.

  3. #3
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Re: Assigned Macro Name Changed

    Thanks for the reply.

    I think I am too much of a novice to understand. How do I "look behind" the worksheet? Here's what I did based on what you said: I looked in the VBA editor and in the left hand navigation panel, I right clicked on one of the sheet names that I know has buttons in it. In the dropdown, I selected view code. I then changed the left hand drop down to "worksheet" and then sucessively looked at the code that came up for each of the options in the right hand panel. None had anything that resembled "group30_click".

    Going further, what if it group30_click IS an event macro behind the sheet? When xcel changes the value I put in the "assign macro" dialog, I lose the ability to recognize what I have coded. Can I keep xcel from doing that to me? Does it do this for all button assignments?

    Thanks again for the quick reply.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Assigned Macro Name Changed

    Did you group the wordart shapes after you originally assigned the macros? If so, then the groupnn_click macro do not currently exist - that is simply the name excel is suggesting when you right-click the group and choose assign macro.
    Remember what the dormouse said
    Feed your head

  5. #5
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Smile Re: Assigned Macro Name Changed

    Thanks, I think you have hit the nail on the head.

    I had noticed that some of the buttons have the groupnn_click substitution and some not. Also the buttons on the tool bar that I created do not. The buttons that have the substitution, indeed, are grouped objects. I just tried ungrouping one of the button objects and noticed that the component objects have the original, unsubstituted macro name assigned.

    I'm not sure if the grouping was done after assigning the macro. Also, the button, with the Groupnn-click assignment correctly invokes my intended macro.

    So, I assume Groupnn_click is an intermediary-Excel-generated macro that ultimately calls my original macro....right? If this is so, is there anyway for me to givel Excel a meaniingful-to-me name that I want the intermediary macro to have?



    Thanks again.
    Last edited by DanBlum; 08-29-2010 at 01:01 PM.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Assigned Macro Name Changed

    No, that macro does not exist, nor do you need it. It is just a name that is suggested if you want to assign a macro to the group. It's the same as when you add a button (or shape) to the sheet and choose Assign macro - it defaults to something like Button1_Click if you want to create a macro, or you can ignore that and assign an existing macro.
    If you want to see the macro assigned to a shape within the group, ungroup the shapes first, or you may be able to select an individual shape within the group.

  7. #7
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Re: Assigned Macro Name Changed

    Ok.... I got it. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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