+ Reply to Thread
Results 1 to 11 of 11

Need someone to look over my userform code as i keep getting error 361 for no reason

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    Goa
    MS-Off Ver
    2013
    Posts
    16

    Need someone to look over my userform code as i keep getting error 361 for no reason

    Hey i created a userform that is fully functional it works great except randomly it gives an error no. 361 saying it cannot load or unload n i cant save or do any thing except exit.
    there is also incomplete code where im trying to save my listbox entries to a txt file.

    i will upload the worksheet


    thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    Which userform are you having problems with?
    If posting code please use code tags, see here.

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

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    Hi
    I can't get to your code as I get error messages, but this sounds like a DoEvents type of problem. Insert DoEvents in your code to allow other windows operations to perform before coming back and trying to do the next step of code...

    http://office.microsoft.com/en-us/ex...080557164.aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    07-07-2014
    Location
    Goa
    MS-Off Ver
    2013
    Posts
    16

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    sorry the username is Victory and the password is 2014

    the problem is most likely with the case manager userform but it even popped up while i was in vba for no reason i guess.

    how do i use the DoEvents im new to vba just picked it up as a project last month so forgive me if i seem lost
    i would also like someone to check to see the integrity of the code i used or if i beat around the bush to get things done

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

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    You put DoEvents everywhere in your code where you are asking Excel to go out to the OS or other programs and do stuff. I'd put it directly after an Open command or something that takes up CPU time.

    Look at http://www.mrexcel.com/forum/excel-q...ts-solved.html

  6. #6
    Registered User
    Join Date
    07-07-2014
    Location
    Goa
    MS-Off Ver
    2013
    Posts
    16

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    K thanks will try that
    also i would really appreciate it if my code could be looked over just to see if its ok.
    and how for the life of me do i save the contents of the listbox in a text file the code i had tried to do that was not saved as i could not save the excel file
    Last edited by uglymaggot; 08-24-2014 at 01:56 AM.

  7. #7
    Registered User
    Join Date
    07-07-2014
    Location
    Goa
    MS-Off Ver
    2013
    Posts
    16

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    Im really not sure where to put the doevents
    and how to save the listbox items to a text file

  8. #8
    Registered User
    Join Date
    07-07-2014
    Location
    Goa
    MS-Off Ver
    2013
    Posts
    16

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    *bump* sry for posting again

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    Do you have the option to Debug when you get the error?

    If you don't try going to Tools>Options and selecting either Break on All Errors or Break on Errors in Code Modules on the General tab.

  10. #10
    Registered User
    Join Date
    07-07-2014
    Location
    Goa
    MS-Off Ver
    2013
    Posts
    16

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    hey ill give that a try

    also sometimes if i input data when i double click the listbox it gives the wrong entry in the boxes to edit i do not know why? i really need someone to just check the code to see if it makes complete sense

    thanks

  11. #11
    Registered User
    Join Date
    07-07-2014
    Location
    Goa
    MS-Off Ver
    2013
    Posts
    16

    Re: Need someone to look over my userform code as i keep getting error 361 for no reason

    hey thanks Norie i was able to correct the 361 error

    But im still getting trouble with the application overall as in if i select an entry by double clicking it in the list box it gets transferred to the text boxes below for me to edit but the data that gets transferred is not the same data i selected but a totally different entry i really dont know how to fix this as there is no error just a misleading line in the code i guess i could upload the code if that would help.

    thanks for all the help hope we can find a solution to the problem

+ 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. run time error '91' -reason for error known, unsure how to fix it
    By xacx3x in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2014, 11:19 AM
  2. Getting Expected End Sub error.. No Reason!
    By PatCell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2014, 12:49 PM
  3. [SOLVED] #Ref error cant work out the reason
    By Tristanfrontline in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2013, 02:02 AM
  4. [SOLVED] #REF! error.... for no apparent reason
    By singer.joseph in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 02-25-2013, 06:44 AM
  5. Help with this error Unknown reason for error with Range().Select
    By Brad Sumner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2005, 12:05 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