+ Reply to Thread
Results 1 to 3 of 3

VB codes for delete command button

  1. #1
    Registered User
    Join Date
    04-23-2007
    Posts
    8

    VB codes for delete command button

    Will any expert pl help me on the following?

    I searched the entire website and found an example where by data can be entered into the excel sheets using the user forms. But all the user forms have only the "Ok", "Clear" and "Cancel" buttons. I want to delete a row of data in the excel sheet that has been entered using the user form. This deletion should be done only through a command button "delete". How do I do this? What are the codes for that?

    Also I want to have codes for "Previous", "Next", "First" and "Last" command buttons.

    Looking forward to your reply at the earliest.

    Lilly

  2. #2
    Registered User
    Join Date
    04-18-2007
    Posts
    12
    i don't think i am understanding your problem properly because when i create a userform it allows me to choose what controls are on there and you can write the code specific to that button. i have played around for a few seconds and could probably write you some code that would delete a number of cells? i think i would use activecell.value = "" iteratively although i am sure there are cleverer more succinct ways of doing this. don't think i am understanding the problem though! i am not an expert so you may need some who is!!!

  3. #3
    Registered User
    Join Date
    12-18-2006
    Posts
    46
    Hi Lilly,

    I'm afraid there's not a generic solution to this (like copy&paste this bit of code, and everything will work). Someone will help you, but you should be more specific with your desires, and you should post an example of your workbook. It will help, greatly.

+ 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