Results 1 to 4 of 4

Thread: Clear ID CARD with commandbutton

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    7
    Rep Power
    0

    Clear ID CARD with commandbutton

    I downloaded this workbook which i hope to use with some mods.....with a commandbutton can the ID CARD be cleared of the picture,persons name and colors but leaving the names of the sections in a white cell.....when i select a name again from drowdown list it then again populates the card...the reason for this is i will make 100 ID CARDS

    Cheers

    Rod
    Attached Files Attached Files

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Can you rephrase your question. Not sure I understand it well.
    Code:
    Sub EF()
    Range("B3:D9").clearContents
    End Sub
    The above should clear all the values in the mentioned range.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    7
    Rep Power
    0
    If i select the commandbutton it clears the ID CARD...please see attached -what the card would look like after the commandbutton selected to clear data.....if i then select a name from the dropdown list it will then again populate the card with picture and colored cells according to name selected
    Attached Files Attached Files

  4. #4
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10

    I've added a hyphen below in the main list, and also in the Pictures tab. That will give an effect of clearing the card. Have added a code as below to change the name to hyphen

    Code:
    Private Sub CommandButton1_Click()
    
        Me.Range("rngCurrentName").Value = "-"
        
    End Sub
    Attached Files Attached Files
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. How To Close A UserForm With A CommandButton
    By jeff in forum Excel Help
    Replies: 8
    Last Post: 07-21-2013, 12:37 PM
  2. Replies: 9
    Last Post: 12-04-2012, 09:45 PM
  3. Macro To Clear Certain Data Across Many Sheets
    By Howardc in forum Excel Help
    Replies: 2
    Last Post: 12-04-2012, 09:10 AM
  4. Macro to clear data based on color fill
    By Howardc in forum Excel Help
    Replies: 7
    Last Post: 12-03-2012, 09:25 AM
  5. VBA Code to Clear the Immediate Window.
    By technicalupload in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 09-02-2011, 03:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •