+ Reply to Thread
Results 1 to 4 of 4

2 Macros conflicting with each other

  1. #1
    Registered User
    Join Date
    08-09-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    2 Macros conflicting with each other

    I have a spreadsheet with several macros and two of them seem to conflict with each other. I'm not a VBA expert so there's probably a simple reason for it so I'll post the two macros here.
    Popup Calendar userform
    Please Login or Register  to view this content.
    Macro that calls this userform
    Please Login or Register  to view this content.
    This worked fine until I added another macro for updating a formula calculation when new data is added.
    Please Login or Register  to view this content.
    Can anyone tell me what I need to change to make this work?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,468

    Re: 2 Macros conflicting with each other

    You do not say what the actual problem is, nor do you show the CopyBalance
    routine.

    I guess the problem is the worksheet change event firing when you update the activecell. If you do not want the event to run you will need to disable events whilst updating the sheet.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-09-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: 2 Macros conflicting with each other

    Sorry I missed saying what error I'm getting...
    The message box says "Run-time error '400': Form already displayed; can't show modally"

    The CopyBalance macros is
    Please Login or Register  to view this content.
    When I added the code you suggested Andy, the calendar pops up in columns where I enter the data, not just column B which is my Date column.

    I would also like the cursor to return to the position where the last data was entered when the CopyBalance macro ran. Any suggestions for this?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,468

    Re: 2 Macros conflicting with each other

    The error suggests you have code somewhere that is trying to load the userform whilst it is already displayed. I can not see that in the code you have posted.

    Can you post workbook example.

+ 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