+ Reply to Thread
Results 1 to 10 of 10

screen locks on userform screen sometimes

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    screen locks on userform screen sometimes

    hi
    I have a barcoding program made with a lot of help from you guys,it has several userforms,the main screen sometimes locks up,and I have to do a ctrl alt del to shut it down,but does not come up with any error message,is this usual with excel,its working ok at min so not worth uploading program without it doing this but could do if needed,could I put on error resume and would I need to put these in all procedures/ userforms
    cheers colin
    Last edited by cfinch100; 11-12-2013 at 02:34 PM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: screen locks on userform screen sometimes

    May be is there any sheet change event present in the sheet and when changing the cell value then it keep on calling the change event.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: screen locks on userform screen sometimes

    hi
    thanks for reply ,there is change events in frmissued but none in userform1 where the problem seems to be to me,its this screen that locks up and computer just makes a noise but no error message comes up ,have added program,as said does not do it always,but loses some data of goods booked out and in when it does crash
    cheers colin
    Attached Files Attached Files

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: screen locks on userform screen sometimes

    I am just adding the enable events Off/On code in your sheet1 code.

    Do right click on sheet1 sheet tab and select view code and replace your sheet change event code with the below one.

    Please Login or Register  to view this content.
    Please check and confirm

  5. #5
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: screen locks on userform screen sometimes

    hi
    many thanks for that will try it andlet you know
    cheers colin

  6. #6
    Forum Contributor
    Join Date
    03-21-2013
    Location
    Corvallis, OR
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: screen locks on userform screen sometimes

    I've had the same problem and tried the same solution, but from my personal experience with userforms, code called from the userform is entirely event driven and will have no effect disabling or enabling events elsewhere because you can't disable events in the middle of an event...
    If I helped, please click on Add Reputation.

  7. #7
    Forum Contributor
    Join Date
    03-21-2013
    Location
    Corvallis, OR
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: screen locks on userform screen sometimes

    The problem for me seemed to be something related to multiple userforms being hidden and shown repeatedly. I got around this problem by combining all my userforms into a single userform with a multipage that represents all of the previously individual userforms as separate pages in the multipage. Coding has to change considerably, and renaming objects to something that makes sense as to what they are for is very helpful. Using the Tag property to indicate where a particular input object (such as a textbox) is intended to update a cell value is also helpful because you can loop through all the objects on a page, or the entire multipage, and place the object's value in the location indicated by its Tag property.

  8. #8
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: screen locks on userform screen sometimes

    hi
    bmxfreedom
    thanks for that also ,looks like might have to rethink how it works ,just can not understand why it happens a
    only now and then sometimes works for a week or more and issues and returns lots of items
    cheers colin

  9. #9
    Forum Contributor
    Join Date
    03-21-2013
    Location
    Corvallis, OR
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: screen locks on userform screen sometimes

    Yeah, I couldn't understand it either. I built a rental management system for work that could track the progress of bike rentals going in and out, link to customer data exported from our point of sale system, print appropriate liability release slips to sign, and keep a searchable database of all past and current rentals. On occasion, it would just lock up and the only way you could exit was through the task manager. After a lot of research, I started to find that the problem was pretty much universal with the use of multiple complex userforms, as yours are, and someone offered up the solution of using a multipage instead of multiple userforms. It was the first time I'd ever built anything that required multiple userforms and/or pages, and after the massive undertaking of changing all of it over to a multipage, it has worked flawlessly ever since. Now I've learned a ton, and I set up all my userforms as I suggested earlier; using smart object names and the Tag property as appropriate. I'm currently working on a special order system that works on the same premise. It's coming together well, and I'm very excited! Another thing that you may want to know about is the TabStyle property of the multipage. You can set it so that the tabs aren't visible, which would seem appropriate for your what you're working on.
    Good luck!

  10. #10
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: screen locks on userform screen sometimes

    hi bmxfreedom
    have started changing it to a multipage userform(thanks a million)its gonna be hard going but can see what you mean flicking through pages is flawless
    at the minute thanks very much for shoving me in the right direction,will mark this as solved but will let you know how it goes

    sometimes its not all about someone writing code for us to help ,sometimes its all about their own experiences using excel and sharing problems and answers
    many thanks colin
    Last edited by cfinch100; 11-12-2013 at 02:37 PM.

+ 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. Replies: 7
    Last Post: 10-29-2014, 03:41 AM
  2. [SOLVED] Adjust screen resolution automatically to fit all screen sizes
    By Ace_XL in forum Excel General
    Replies: 2
    Last Post: 06-14-2012, 08:51 AM
  3. Replies: 10
    Last Post: 04-19-2011, 09:27 PM
  4. [SOLVED] print box opens in right screen of dual screen setup why
    By gerrys in forum Excel General
    Replies: 1
    Last Post: 06-30-2006, 01:50 PM
  5. help! print screen locks up excel
    By pywhacket in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-24-2006, 03:35 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