+ Reply to Thread
Results 1 to 10 of 10

Macros link problem?

Hybrid View

  1. #1
    Registered User
    Join Date
    10-16-2006
    Posts
    5

    Macros link problem?

    Hello,

    A project I've inherited is causing me a little headache...


    An old button wich was calling a procedure to quit the excel
    application has been removed. Since that time, whenever a user is
    clicking on any cell (not already linked to a macro), it is calling the
    quitting procedure.


    This procedure is still called elsewhere, so I don't want to get rid of
    it.


    I've tried moving the project to a new workbook but the problem is
    still there!


    Is there any place I can see the link between controls and macros? Or
    do have any ideas what the problem could be?


    Thank you all!

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    The procedure is being called by a 'Change Event' like
    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    or
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    these can be found by looking at the visual basic editor and checking the sheet modules for each sheet and the This WorkBook module, thats the only way by clicking a cell the procedure can be run, if its not a Change Event then it could be a Click Event like
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    or
    Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
    look in both modules for these.

    Regards,
    Simon

  3. #3
    Registered User
    Join Date
    10-16-2006
    Posts
    5
    Thanks for your response Simon.

    Unfortunately, I've already checked in those events, putting breakpoints, put it wont even go in there. It calls the quitting procedure immediately.

    Even more puzzling, it happens on every machine but one: the only thing different with that one is that windows and office languages are English, as opposed to all the others that are (and have to remain) French. Not sure if that's a factor...

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Can you post your workbook or code in its entirety?

    Regards,
    Simon

  5. #5
    Registered User
    Join Date
    10-16-2006
    Posts
    5
    Unfortunately, I don't have the rights to post it.

    The key maybe under protection though... maybe a workaround could be done?

    Situation right now is, under the protect sheet option :
    Everything unchecked except "Select unlocked cells"
    -> that works on every sheets but one. but on the PC setted differently (English), works everywhere! I mean, the cursor changes to an hand (showing a macro is assigned) even if there is no macro assigned, but on the other working PC, the cursor is a plus sign (apparently no macros assigned)...

    Them, if I check the "edit objects" on that problematic sheet
    -> now the macro isn't called anymore but the user can drag and resize the objects on the sheet, wich is less of a problem but still not good.

    So when we uncheck "edit objects", the sheet is assigned a macro (quitting procedure) to everywhere on the sheet that doesn't have a macro already assigned to it.

    This is really odd...

    Thanks for your help!

  6. #6
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    I dont understand, if, as i suggested earlier you did view and check the modules for the change event then you have the capability to copy the code to here, its a straight highlight of the code and then paste into your message window!

    regards,
    Simon
    Last edited by Simon Lloyd; 10-18-2006 at 11:15 AM.

+ 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