PDA

View Full Version : Clear ID CARD with commandbutton



rodneykaye
10-24-2013, 03:23 PM
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

Excel Fox
10-24-2013, 03:50 PM
Can you rephrase your question. Not sure I understand it well.


Sub EF()
Range("B3:D9").clearContents
End Sub
The above should clear all the values in the mentioned range.

rodneykaye
10-24-2013, 03:58 PM
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

Excel Fox
10-27-2013, 09:46 AM
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


Private Sub CommandButton1_Click()

Me.Range("rngCurrentName").Value = "-"

End Sub