+ Reply to Thread
Results 1 to 9 of 9

error with MsgBox

  1. #1
    Registered User
    Join Date
    03-21-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    60

    error with MsgBox

    Hi Friends,

    I worte a procedure to protect the worksheet. When we clik on command button it asks the password but if I click on cancel button procedure is exiting.

    Please help me with this code.

    Please Login or Register  to view this content.
    Thans and Regards
    Ramesh
    Last edited by ramserp; 12-10-2009 at 07:03 AM. Reason: to make title SOLVED

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: error with MsgBox

    I think this is what you want
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    03-21-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: error with MsgBox

    Hi Roy,

    When I click on Cancel button it is not closing the inputbox window.


    I have attached my excel please verify it.


    Thanks & Regards
    Ramesh
    Attached Files Attached Files

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: error with MsgBox

    The password for the attched sheet is not sadc

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: error with MsgBox

    I've changed the password to sadc & the code works ine
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-21-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: error with MsgBox

    Hi Roy,

    When I click on Cancel button the inputbox window is not closing. Please kindly correct the following code.
    Please Login or Register  to view this content.
    Thanks & Regards
    Ramesh

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: error with MsgBox

    Your code was written that way, all I've done is make it work as the code seemed to want it to. Have you edited someone else's code?

    The idea with the Forum is to provide help, you should study the code & try to make such simple changes yourself
    Please Login or Register  to view this content.
    Last edited by royUK; 12-10-2009 at 05:54 AM.

  8. #8
    Registered User
    Join Date
    03-21-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: error with MsgBox

    Hi Roy,

    Thank you very much for spending your valuable time to reply my posts.

    I wrote this procedure myself by refering a similar procedure. I am newbie of VBA so I am facing some problems with logic.


    Thanks & Regards
    Ramesh

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: error with MsgBox

    No problem. try to understand the code 7 post back with specific questions on anyhing that you do not understandIf you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    You might also like to rate any answer(s)

+ 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