+ Reply to Thread
Results 1 to 4 of 4

activate cancel button in a inputbox

  1. #1
    Registered User
    Join Date
    05-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    99

    activate cancel button in a inputbox

    in vb, i have the following code to enter clients details, which works fine:

    Please Login or Register  to view this content.
    We have some new staff starting next week, so i wanted to tidy a few things up, namely when you 'add new client' the inputbox appears, but at the moment if you hit cancel the code chokes and the usual vb runtime error appears.

    all i wanted therefore is an idea of how to apply a line or two to allow the user to cleanly cancel and return to the 'client list' sheet.

    i'm sure this is quite simple, i just hope it doesnt need a complete overhaul of the way this code's written.

    many thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: activate cancel button in a inputbox

    Hi,

    Please Login or Register  to view this content.
    Incidentally provided the user always enters dates in the ddmmyy format you will be OK, but you might want to consider what would happen if a US user say entered mmddyy. You might like to consider capturing the day, date and month in separate listboxes which contain days 1-31, months January - December and Year numbers. Then you can build the Date variable by using the DateSerial() instruction.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: activate cancel button in a inputbox

    thanks, that worked great.

    I have another problem while doing this 'tidy up'

    i'll have to start a new thread on it, for some reason i cannot get to the manage attachments pane, hoping a new thread will solve the problem

  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: activate cancel button in a inputbox

    Quote Originally Posted by mania112 View Post
    thanks, that worked great.

    I have another problem while doing this 'tidy up'

    i'll have to start a new thread on it, for some reason i cannot get to the manage attachments pane, hoping a new thread will solve the problem
    You should start a new Thread for additional questions, add a link to this one if i might help.
    Hope that helps.

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

    Free DataBaseForm 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