+ Reply to Thread
Results 1 to 13 of 13

Private Sub Running whenever anything else edited

  1. #1
    Registered User
    Join Date
    08-05-2014
    Location
    Aberdeen, Scotland
    MS-Off Ver
    2010
    Posts
    12

    Private Sub Running whenever anything else edited

    I have written a private sub which allows em to select a customer from my list of customers (it is an invoicing spreadsheet) using a google type search criteria. This works very well however whenever I run one of the other macros or indeed edit any field in the spreadsheet, the private sub runs leaving the customer name in a 'floating' blue box on the appropriate sheet. When I 'step into' one of the macros to check it, the private sub runs several times during this operation, most annoying.

    Does anyone know how I can get around this problem?

    Thanks

    Raymond

  2. #2
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Istanbul / Turkey
    MS-Off Ver
    2013 - Win10 - 64bit
    Posts
    1,007

    Re: Private Sub Running whenever anything else edited

    Please sent an example excel file...
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

  3. #3
    Registered User
    Join Date
    08-05-2014
    Location
    Aberdeen, Scotland
    MS-Off Ver
    2010
    Posts
    12

    Re: Private Sub Running whenever anything else edited

    See attached file
    Attached Files Attached Files

  4. #4
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Istanbul / Turkey
    MS-Off Ver
    2013 - Win10 - 64bit
    Posts
    1,007

    Re: Private Sub Running whenever anything else edited

    First,
    Attached file doesnt allow me to select a customer from list of customers. Do you know why ?

  5. #5
    Registered User
    Join Date
    08-05-2014
    Location
    Aberdeen, Scotland
    MS-Off Ver
    2010
    Posts
    12

    Re: Private Sub Running whenever anything else edited

    It needs us to delete the current name then start typing the new name and hopefully it gives a list of all customers with the typed letters in their name

  6. #6
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Istanbul / Turkey
    MS-Off Ver
    2013 - Win10 - 64bit
    Posts
    1,007

    Re: Private Sub Running whenever anything else edited

    All right..
    Attached file doesnt allow me to select product, quantity and price. Do you know why ?

  7. #7
    Registered User
    Join Date
    08-05-2014
    Location
    Aberdeen, Scotland
    MS-Off Ver
    2010
    Posts
    12

    Re: Private Sub Running whenever anything else edited

    Sorry should have explained how it works. WE use a bar code reader to enter numbers into column C (starting at C13) on the "inv" sheet then hit 'Summarise' to move to the 'SubT' sheet which summarises the invoice for printing. Examples of the bar codes are:
    2089840008221
    2089702002688
    2089701002870

  8. #8
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Istanbul / Turkey
    MS-Off Ver
    2013 - Win10 - 64bit
    Posts
    1,007

    Re: Private Sub Running whenever anything else edited

    All right...
    Do you have a problem with this?
    And what is your problem exactly?
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-05-2014
    Location
    Aberdeen, Scotland
    MS-Off Ver
    2010
    Posts
    12

    Re: Private Sub Running whenever anything else edited

    This private sub appears to run very regularly. For example when I enter some bar codes then 'step into' the summarise macro the private sub runs 10 times during process.

    Also I have a blue 'floating' box with the customer name on it which is on every sheet.

  10. #10
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Istanbul / Turkey
    MS-Off Ver
    2013 - Win10 - 64bit
    Posts
    1,007

    Re: Private Sub Running whenever anything else edited

    Sorry, my English is not perfect.
    Please sent a picture or explain your problem clearly...

  11. #11
    Registered User
    Join Date
    08-05-2014
    Location
    Aberdeen, Scotland
    MS-Off Ver
    2010
    Posts
    12

    Re: Private Sub Running whenever anything else edited

    See attached word document with a couple of pictures in it. They show the blue box which appears on all sheets (even other excel files that are open).
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    08-05-2014
    Location
    Aberdeen, Scotland
    MS-Off Ver
    2010
    Posts
    12

    Re: Private Sub Running whenever anything else edited

    As a better example I attache a simple file with a searchable drop box which work great. This drop box has the private sub attached. However whenever I hit F2 to edit any cell on the sheet a blue box appears with the selected country and when I scroll down the blue box 'floats'.

    Is there any way of getting rid of this?
    Attached Files Attached Files

  13. #13
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Istanbul / Turkey
    MS-Off Ver
    2013 - Win10 - 64bit
    Posts
    1,007

    Re: Private Sub Running whenever anything else edited

    Hi,
    Your file is very complicated.
    I cant understand what your attached file is doing.

    I prepared a simple file which works with combobox.

    Check enclosed file.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help running 2 Private Sub VBAs in 1 sheet
    By BlueEyedLady in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2013, 06:51 PM
  2. running a private sub macro
    By NALDO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2012, 06:44 PM
  3. Running a macro automatically when a cell is edited
    By mattsgr1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-10-2007, 06:41 AM
  4. [SOLVED] running private sub
    By Gary Keramidas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2005, 05:05 AM
  5. Private Sub Running Other Private Sub Inadvertently
    By Ross Culver in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2005, 09:06 PM

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